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 <gaudenz@jgraph.com>2017-03-07 10:47:52 +0300
committerGaudenz Alder <gaudenz@jgraph.com>2017-03-07 10:47:52 +0300
commite00cea0aeafafc29eee8bffbabb15b7fa58c389f (patch)
tree8eb7c623c6c550856285a5ed4479948978c2dbf5
parent21edb67c3be045f19c34c5bbd0f0acf81386677f (diff)
6.2.5 releasev6.2.5
Former-commit-id: 8870f1259d9cef6b4374afb01ee61e9fb58f7944
-rw-r--r--ChangeLog6
-rw-r--r--VERSION2
-rw-r--r--war/WEB-INF/lib/datanucleus-appengine-1.0.10.final.jarbin0 -> 316059 bytes
-rw-r--r--war/WEB-INF/lib/datanucleus-core-1.1.5.jarbin0 -> 1933065 bytes
-rw-r--r--war/WEB-INF/lib/datanucleus-jpa-1.1.5.jarbin0 -> 152768 bytes
-rw-r--r--war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jarbin0 -> 52877 bytes
-rw-r--r--war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jarbin0 -> 16030 bytes
-rw-r--r--war/WEB-INF/lib/jdo2-api-2.3-eb.jarbin0 -> 192696 bytes
-rw-r--r--war/cache.manifest2
-rw-r--r--war/electron.js80
-rw-r--r--war/js/app.min.js330
-rw-r--r--war/js/atlas-viewer.min.js178
-rw-r--r--war/js/atlas.min.js554
-rw-r--r--war/js/diagramly/App.js10
-rw-r--r--war/js/diagramly/Dialogs.js85
-rw-r--r--war/js/diagramly/EditorUi.js27
-rw-r--r--war/js/diagramly/GitHubClient.js16
-rw-r--r--war/js/diagramly/Menus.js39
-rw-r--r--war/js/embed-static.min.js2
-rw-r--r--war/js/reader.min.js2
-rw-r--r--war/js/viewer.min.js178
-rw-r--r--war/package.json62
-rw-r--r--war/resources/dia.txt1
-rw-r--r--war/resources/dia_am.txt1
-rw-r--r--war/resources/dia_ar.txt1
-rw-r--r--war/resources/dia_bg.txt1
-rw-r--r--war/resources/dia_bn.txt1
-rw-r--r--war/resources/dia_bs.txt1
-rw-r--r--war/resources/dia_ca.txt1
-rw-r--r--war/resources/dia_cs.txt1
-rw-r--r--war/resources/dia_da.txt1
-rw-r--r--war/resources/dia_de.txt1
-rw-r--r--war/resources/dia_el.txt1
-rw-r--r--war/resources/dia_es.txt1
-rw-r--r--war/resources/dia_et.txt1
-rw-r--r--war/resources/dia_fa.txt1
-rw-r--r--war/resources/dia_fi.txt1
-rw-r--r--war/resources/dia_fil.txt1
-rw-r--r--war/resources/dia_fr.txt1
-rw-r--r--war/resources/dia_gu.txt1
-rw-r--r--war/resources/dia_he.txt1
-rw-r--r--war/resources/dia_hi.txt1
-rw-r--r--war/resources/dia_hr.txt1
-rw-r--r--war/resources/dia_hu.txt1
-rw-r--r--war/resources/dia_i18n.txt1
-rw-r--r--war/resources/dia_id.txt1
-rw-r--r--war/resources/dia_it.txt1
-rw-r--r--war/resources/dia_ja.txt1
-rw-r--r--war/resources/dia_kn.txt1
-rw-r--r--war/resources/dia_ko.txt1
-rw-r--r--war/resources/dia_lt.txt1
-rw-r--r--war/resources/dia_lv.txt1
-rw-r--r--war/resources/dia_ml.txt1
-rw-r--r--war/resources/dia_mr.txt1
-rw-r--r--war/resources/dia_ms.txt1
-rw-r--r--war/resources/dia_nl.txt1
-rw-r--r--war/resources/dia_no.txt1
-rw-r--r--war/resources/dia_pl.txt1
-rw-r--r--war/resources/dia_pt-br.txt1
-rw-r--r--war/resources/dia_pt.txt1
-rw-r--r--war/resources/dia_ro.txt1
-rw-r--r--war/resources/dia_ru.txt1
-rw-r--r--war/resources/dia_sk.txt1
-rw-r--r--war/resources/dia_sl.txt1
-rw-r--r--war/resources/dia_sr.txt1
-rw-r--r--war/resources/dia_sv.txt1
-rw-r--r--war/resources/dia_sw.txt1
-rw-r--r--war/resources/dia_ta.txt1
-rw-r--r--war/resources/dia_te.txt1
-rw-r--r--war/resources/dia_th.txt1
-rw-r--r--war/resources/dia_tr.txt1
-rw-r--r--war/resources/dia_uk.txt1
-rw-r--r--war/resources/dia_vi.txt1
-rw-r--r--war/resources/dia_zh-tw.txt1
-rw-r--r--war/resources/dia_zh.txt1
75 files changed, 845 insertions, 781 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c7c9288..1724e168 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+07-MAR-2017: 6.2.5
+
+- Adds remote JPEG export option
+- Fixes OneDrive, adds GitHub in Edit Link dialog
+- Fixes import of JPG and GIF from GitHub and URL
+
01-MAR-2017: 6.2.4
- Uses mxGraph 3.7.1
diff --git a/VERSION b/VERSION
index 31b44b03..03825cde 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-6.2.4 \ No newline at end of file
+6.2.5 \ No newline at end of file
diff --git a/war/WEB-INF/lib/datanucleus-appengine-1.0.10.final.jar b/war/WEB-INF/lib/datanucleus-appengine-1.0.10.final.jar
new file mode 100644
index 00000000..668a7f85
--- /dev/null
+++ b/war/WEB-INF/lib/datanucleus-appengine-1.0.10.final.jar
Binary files differ
diff --git a/war/WEB-INF/lib/datanucleus-core-1.1.5.jar b/war/WEB-INF/lib/datanucleus-core-1.1.5.jar
new file mode 100644
index 00000000..caac70e9
--- /dev/null
+++ b/war/WEB-INF/lib/datanucleus-core-1.1.5.jar
Binary files differ
diff --git a/war/WEB-INF/lib/datanucleus-jpa-1.1.5.jar b/war/WEB-INF/lib/datanucleus-jpa-1.1.5.jar
new file mode 100644
index 00000000..657fd0fa
--- /dev/null
+++ b/war/WEB-INF/lib/datanucleus-jpa-1.1.5.jar
Binary files differ
diff --git a/war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jar b/war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jar
new file mode 100644
index 00000000..12d4ab0d
--- /dev/null
+++ b/war/WEB-INF/lib/geronimo-jpa_3.0_spec-1.1.1.jar
Binary files differ
diff --git a/war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar b/war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar
new file mode 100644
index 00000000..ee9963df
--- /dev/null
+++ b/war/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar
Binary files differ
diff --git a/war/WEB-INF/lib/jdo2-api-2.3-eb.jar b/war/WEB-INF/lib/jdo2-api-2.3-eb.jar
new file mode 100644
index 00000000..a039ae7f
--- /dev/null
+++ b/war/WEB-INF/lib/jdo2-api-2.3-eb.jar
Binary files differ
diff --git a/war/cache.manifest b/war/cache.manifest
index 8d7eb320..7e42a7f1 100644
--- a/war/cache.manifest
+++ b/war/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 03/01/2017 02:39 PM
+# 03/07/2017 08:44 AM
app.html
index.html?offline=1
diff --git a/war/electron.js b/war/electron.js
index da61ef32..ddb3cbc0 100644
--- a/war/electron.js
+++ b/war/electron.js
@@ -1,21 +1,11 @@
const fs = require('fs')
const path = require('path')
-const url = require('url')
const electron = require('electron')
const ipcMain = electron.ipcMain
const dialog = electron.dialog
const app = electron.app
const BrowserWindow = electron.BrowserWindow
-const autoUpdater = require('electron-updater').autoUpdater
-const log = require('electron-log')
-autoUpdater.logger = log
-autoUpdater.logger.transports.file.level = 'info'
-// autoUpdater.autoDownload = false
-autoUpdater.autoDownload = true
-
-const __DEV__ = process.env.NODE_ENV === 'development'
-
let windowsRegistry = []
function createWindow (opt = {}) {
@@ -23,9 +13,6 @@ function createWindow (opt = {}) {
width: 1600,
height: 1200,
'web-security': false,
- webPreferences: {
- // preload: path.resolve('./preload.js'),
- },
}, opt)
let mainWindow = new BrowserWindow(options)
@@ -33,27 +20,9 @@ function createWindow (opt = {}) {
console.log('createWindow', opt)
- let wurl = url.format({
- pathname: `${__dirname}/index.html`,
- protocol: 'file:',
- query: {
- 'dev': __DEV__ ? 1 : 0,
- 'test': 1,
- 'db': 0,
- 'gapi': 0,
- 'od': 0,
- 'analytics': 0,
- 'picker': 0,
- 'mode': 'device',
- 'browser': 0,
- 'p': 'electron',
- },
- slashes: true,
- })
-
-//`file://${__dirname}/index.html?dev=1&test=1&db=0&gapi=0&od=0&analytics=0&picker=0&mode=device&browser=0&p=electron`
// and load the index.html of the app.
- mainWindow.loadURL(wurl)
+ mainWindow.loadURL(
+ `file://${__dirname}/index.html?dev=1&test=1&db=0&gapi=0&od=0&analytics=0&picker=0&mode=device&browser=0&p=electron`)
// Open the DevTools.
mainWindow.webContents.openDevTools()
@@ -116,8 +85,6 @@ app.on('ready', e => {
event.returnValue = 'pong'
})
createWindow()
- // checkUpdate()
- autoUpdater.checkForUpdates()
})
// Quit when all windows are closed.
@@ -139,44 +106,5 @@ app.on('activate', function () {
}
})
-function checkUpdate () {
- autoUpdater.checkForUpdates().then(UpdateCheckResult => {
- if (UpdateCheckResult) {
- let idx = dialog.showMessageBox({
- type: 'question',
- buttons: ['Ok', 'Cancel'],
- title: 'Confirm Update',
- message: 'Update available.\n\nWould you like to download and install new version?',
- detail: 'Application will automatically restart to apply update after download',
- })
- if (idx === 0) return autoUpdater.downloadUpdate()
- }
- }).then((a, b) => {
- log.info('@cfu update-downloaded@\n', a, b)
- }).catch(e => {
- log.error('@cfu then error@\n', e)
- })
-}
-
-autoUpdater.on('error', e => log.error('@error@\n', e))
-
-autoUpdater.on('update-available',
- (a, b) => log.info('@update-available@\n', a, b))
-
-/**/
-autoUpdater.on('update-downloaded', (event, info) => {
- log.info('@update-downloaded@\n', info, event)
- // Ask user to update the app
- dialog.showMessageBox({
- type: 'question',
- buttons: ['Install and Relaunch', 'Later'],
- defaultId: 0,
- message: 'A new version of ' + app.getName() + ' has been downloaded',
- detail: 'It will be installed the next time you restart the application',
- }, response => {
- if (response === 0) {
- setTimeout(() => autoUpdater.quitAndInstall(), 1)
- }
- })
-})
-/**/ \ No newline at end of file
+// In this file you can include the rest of your app's specific main process
+// code. You can also put them in separate files and require them here.
diff --git a/war/js/app.min.js b/war/js/app.min.js
index 928e709e..4b1ec18a 100644
--- a/war/js/app.min.js
+++ b/war/js/app.min.js
@@ -3,7 +3,7 @@
d[e])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function k(a){this.opts=e(a||{},k.defaults,u)}function l(){function d(b,d){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',d)}q.addRule(".spin-vml","behavior:url(#default#VML)");k.prototype.lines=function(a,e){function f(){return b(d("group",{coordsize:n+" "+n,coordorigin:-m+" "+-m}),{width:n,height:n})}function k(a,k,l){c(p,c(b(f(),{rotation:360/e.lines*a+"deg",left:~~k}),c(b(d("roundrect",{arcsize:e.corners}),
{width:m,height:e.width,left:e.radius,top:-e.width>>1,filter:l}),d("fill",{color:g(e.color,a),opacity:e.opacity}),d("stroke",{opacity:0}))))}var l,m=e.length+e.width,n=2*m;l=2*-(e.width+e.length)+"px";var p=b(f(),{position:"absolute",top:l,left:l});if(e.shadow)for(l=1;l<=e.lines;l++)k(l,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(l=1;l<=e.lines;l++)k(l);return c(a,p)};k.prototype.opacity=function(a,b,d,e){a=a.firstChild;e=e.shadow&&e.lines||0;a&&b+
e<a.childNodes.length&&(a=a.childNodes[b+e],a=a&&a.firstChild,a=a&&a.firstChild,a&&(a.opacity=d))}}var m,n=["webkit","Moz","ms","O"],p={},q=function(){var b=a("style",{type:"text/css"});return c(document.getElementsByTagName("head")[0],b),b.sheet||b.styleSheet}(),u={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2E9,className:"spinner",top:"50%",left:"50%",position:"absolute"};k.defaults={};e(k.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),!m){var g,k=0,l=(c.lines-1)*(1-c.direction)/2,n=c.fps,p=n/c.speed,t=(1-c.opacity)/(p*c.trail/100),u=p/c.lines;!function J(){k++;for(var a=0;a<c.lines;a++)g=Math.max(1-(k+(c.lines-a)*u)%p*t,c.opacity),e.opacity(f,a*c.direction+l,g,c);e.timeout=
+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),!m){var g,k=0,l=(c.lines-1)*(1-c.direction)/2,n=c.fps,p=n/c.speed,t=(1-c.opacity)/(p*c.trail/100),q=p/c.lines;!function J(){k++;for(var a=0;a<c.lines;a++)g=Math.max(1-(k+(c.lines-a)*q)%p*t,c.opacity),e.opacity(f,a*c.direction+l,g,c);e.timeout=
e.el&&setTimeout(J,~~(1E3/n))}()}return e},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,e){function k(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 l,n=0,p=(e.lines-1)*(1-e.direction)/
2;n<e.lines;n++)l=b(a(),{position:"absolute",top:1+~(e.width/2)+"px",transform:e.hwaccel?"translate3d(0,0,0)":"",opacity:e.opacity,animation:m&&f(e.opacity,e.trail,p+n*e.direction,e.lines)+" "+1/e.speed+"s linear infinite"}),e.shadow&&c(l,b(k("#000","0 0 4px #000"),{top:"2px"})),c(d,c(l,k(g(e.color,n),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,d){b<a.childNodes.length&&(a.childNodes[b].style.opacity=d)}});var t=b(a("group"),{behavior:"url(#default#VML)"});return!d(t,"transform")&&
t.adj?l():m=d(t,"animation"),k});(function(){var a=["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(" "),
@@ -35,8 +35,8 @@ a[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"},f;for(f in c)"string"===typeof c[f]&&Object.hasOwnProperty.call(c,f)&&(c[f]=c[c[f]]);"undefined"!==typeof window&&(window.cssSchema=c);var d,b;(function(){function a(a){var b=parseInt(a.substring(1),16);return 65535<b?(b-=65536,String.fromCharCode(55296+(b>>10),56320+(b&1023))):b==b?String.fromCharCode(b):" ">a[1]?"":a[1]}function e(a,b){return'"'+a.replace(/[\u0000-\u001f\\\"<>]/g,
b)+'"'}function c(a){return g[a]||(g[a]="\\"+a.charCodeAt(0).toString(16)+" ")}function f(a){return k[a]||(k[a]=("">a?"%0":"%")+a.charCodeAt(0).toString(16))}var g={"\\":"\\\\"},k={"\\":"%5c"},l=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]*)|[~|^$*]=|[^\"'\\\\/]|/(?![/*])",
-"gi"),m=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),n=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");b=function(b){return b.replace(m,a)};d=function(a){a=(""+a).replace(/\r\n?/g,"\n").match(l)||[];for(var d=0,g=" ",k=0,m=a.length;k<m;++k){var p=b(a[k]),t=p.length,u=p.charCodeAt(0),p=34==u||39==u?e(p.substring(1,t-1),c):47==u&&1<t||"\\"==p||"--\x3e"==p||"\x3c!--"==p||""==p||32>=
-u?" ":/url\(/i.test(p)?"url("+e(p.replace(n,""),f)+")":p;if(g!=p||" "!=p)a[d++]=g=p}a.length=d;return a}})();"undefined"!==typeof window&&(window.lexCss=d,window.decodeCss=b);var e=function(){function a(a){return(a=(""+a).match(m))?new f(g(a[1]),g(a[2]),g(a[3]),g(a[4]),g(a[5]),g(a[6]),g(a[7])):null}function b(a,b){return"string"==typeof a?encodeURI(a).replace(b,d):null}function d(a){a=a.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(a>>4&15)+"0123456789ABCDEF".charAt(a&15)}function e(a){if(null===
+"gi"),m=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),n=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");b=function(b){return b.replace(m,a)};d=function(a){a=(""+a).replace(/\r\n?/g,"\n").match(l)||[];for(var d=0,g=" ",k=0,m=a.length;k<m;++k){var p=b(a[k]),t=p.length,q=p.charCodeAt(0),p=34==q||39==q?e(p.substring(1,t-1),c):47==q&&1<t||"\\"==p||"--\x3e"==p||"\x3c!--"==p||""==p||32>=
+q?" ":/url\(/i.test(p)?"url("+e(p.replace(n,""),f)+")":p;if(g!=p||" "!=p)a[d++]=g=p}a.length=d;return a}})();"undefined"!==typeof window&&(window.lexCss=d,window.decodeCss=b);var e=function(){function a(a){return(a=(""+a).match(m))?new f(g(a[1]),g(a[2]),g(a[3]),g(a[4]),g(a[5]),g(a[6]),g(a[7])):null}function b(a,b){return"string"==typeof a?encodeURI(a).replace(b,d):null}function d(a){a=a.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(a>>4&15)+"0123456789ABCDEF".charAt(a&15)}function e(a){if(null===
a)return null;a=a.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/");for(var b=k,d;(d=a.replace(b,"$1"))!=a;a=d);return a}function c(a,b){var d=a.T(),c=b.K();c?d.ga(b.j):c=b.X();c?d.da(b.n):c=b.Y();c?d.ea(b.k):c=b.$();var f=b.g,g=e(f);if(c)d.ca(b.V()),g=g&&g.replace(l,"");else if(c=!!f){if(47!==g.charCodeAt(0))var g=e(d.g||"").replace(l,""),k=g.lastIndexOf("/")+1,g=e((k?g.substring(0,k):"")+e(f)).replace(l,"")}else g=g&&g.replace(l,""),g!==f&&d.G(g);c?d.G(g):c=b.aa();c?d.O(b.l):c=b.Z();c&&d.fa(b.o);
return d}function f(a,b,d,e,c,f,g){this.j=a;this.n=b;this.k=d;this.h=e;this.g=c;this.l=f;this.o=g}function g(a){return"string"==typeof a&&0<a.length?a:null}var k=RegExp(/(\/|^)(?:[^./][^/]*|\.{2,}(?:[^./][^/]*)|\.{3,}[^/]*)\/\.\.(?:\/|$)/),l=/^(?:\.\.\/)*(?:\.\.$)?/;f.prototype.toString=function(){var a=[];null!==this.j&&a.push(this.j,":");null!==this.k&&(a.push("//"),null!==this.n&&a.push(this.n,"@"),a.push(this.k),null!==this.h&&a.push(":",this.h.toString()));null!==this.g&&a.push(this.g);null!==
this.l&&a.push("?",this.l);null!==this.o&&a.push("#",this.o);return a.join("")};f.prototype.T=function(){return new f(this.j,this.n,this.k,this.h,this.g,this.l,this.o)};f.prototype.W=function(){return this.j&&decodeURIComponent(this.j).toLowerCase()};f.prototype.ga=function(a){this.j=a?a:null};f.prototype.K=function(){return null!==this.j};f.prototype.da=function(a){this.n=a?a:null};f.prototype.X=function(){return null!==this.n};f.prototype.ea=function(a){this.k=a?a:null;this.G(this.g)};f.prototype.Y=
@@ -44,17 +44,17 @@ function(){return null!==this.k};f.prototype.V=function(){return this.h&&decodeU
this.l};f.prototype.ba=function(a){if("object"===typeof a&&!(a instanceof Array)&&(a instanceof Object||"[object Array]"!==Object.prototype.toString.call(a))){var b=[],d=-1,e;for(e in a){var c=a[e];"string"===typeof c&&(b[++d]=e,b[++d]=c)}a=b}for(var b=[],d="",f=0;f<a.length;)e=a[f++],c=a[f++],b.push(d,encodeURIComponent(e.toString())),d="&",c&&b.push("=",encodeURIComponent(c.toString()));this.l=b.join("")};f.prototype.fa=function(a){this.o=a?a:null};f.prototype.Z=function(){return null!==this.o};
var m=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,n=/[#\/\?@]/g,p=/[\#\?]/g;f.parse=a;f.create=function(a,e,c,g,k,l,m){a=new f(b(a,n),b(e,n),"string"==typeof c?encodeURIComponent(c):null,0<g?g.toString():null,b(k,p),null,"string"==typeof m?encodeURIComponent(m):null);l&&("string"===typeof l?a.O(l.replace(/[^?&=0-9A-Za-z_\-~.%]/g,d)):a.ba(l));return a};f.N=c;f.ma=e;f.ha={ua:function(b){return/\.html$/.test(a(b).U())?"text/html":"application/javascript"},
N:function(b,d){return b?c(a(b),a(d)).toString():""+d}};return f}();"undefined"!==typeof window&&(window.URI=e);var g=void 0,k=void 0,l=void 0,m=void 0;(function(){function a(a){return"string"===typeof a?'url("'+a.replace(A,d)+'")':'url("about:blank")'}function d(a){return B[a]}function f(a,b){return a?e.ha.N(a,b):b}function p(a,b,d){if(!d)return null;var e=(""+a).match(z);return!e||e[1]&&!F.test(e[1])?null:d(a,b)}function x(a){return a.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","<":"%3c",">":"%3e"},z=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;g=function(){var d={};return function H(e,g,k,l,m){e=x(e);var n=c[e];if(n&&"object"===typeof n){for(var t=n.cssPropBits,u=t&80,q=t&1536,v=NaN,y=0,z=0;y<g.length;++y){var A=g[y].toLowerCase(),C=A.charCodeAt(0),B,F,D,E,J,I;if(32===C)A="";else if(34===C)A=16===u?k?a(p(f(l,b(g[y].substring(1,A.length-1))),e,k)):"":
-t&8&&!(u&u-1)?A:"";else if("inherit"!==A){if(J=n.cssLitGroup){var L;if(!(L=n.cssLitMap)){L={};for(var M=J.length;0<=--M;)for(var Y=J[M],U=Y.length;0<=--U;)L[Y[U]]=d;L=n.cssLitMap=L}J=L}else J=d;if(I=J,I[x(A)]!==d)if(35===C&&/^#(?:[0-9a-f]{3}){1,2}$/.test(A))A=t&2?A:"";else if(48<=C&&57>=C)A=t&1?A:"";else if(B=A.charCodeAt(1),F=A.charCodeAt(2),D=48<=B&&57>=B,E=48<=F&&57>=F,43===C&&(D||46===B&&E))A=t&1?(D?"":"0")+A.substring(1):"";else if(45===C&&(D||46===B&&E))A=t&4?(D?"-":"-0")+A.substring(1):t&1?
-"0":"";else if(46===C&&D)A=t&1?"0"+A:"";else if('url("'===A.substring(0,5))A=k&&t&16?a(p(f(l,g[y].substring(5,A.length-2)),e,k)):"";else if("("===A.charAt(A.length-1))a:{J=g;L=y;A=1;M=L+1;for(C=J.length;M<C&&A;)Y=J[M++],A+=")"===Y?-1:/^[^"']*\($/.test(Y);if(!A)for(A=J[L].toLowerCase(),C=x(A),J=J.splice(L,M-L,""),L=n.cssFns,M=0,Y=L.length;M<Y;++M)if(L[M].substring(0,C.length)==C){J[0]=J[J.length-1]="";H(L[M],J,k,l);A=A+J.join(" ")+")";break a}A=""}else A=q&&/^-?[a-z_][\w\-]*$/.test(A)&&!/__$/.test(A)?
-m&&512===q?g[y]+m:1024===q&&c[A]&&"number"===typeof c[A].oa?A:"":/^\w+$/.test(A)&&64===u&&t&8?v+1===z?(g[v]=g[v].substring(0,g[v].length-1)+" "+A+'"',""):(v=z,'"'+A+'"'):""}A&&(g[z++]=A)}1===z&&'url("about:blank")'===g[0]&&(z=0);g.length=z}else g.length=0}}();var E=/^(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)$/,
+"")}var A=/[\n\f\r\"\'()*<>]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},z=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;g=function(){var d={};return function H(e,g,k,l,m){e=x(e);var n=c[e];if(n&&"object"===typeof n){for(var t=n.cssPropBits,q=t&80,u=t&1536,v=NaN,y=0,z=0;y<g.length;++y){var A=g[y].toLowerCase(),C=A.charCodeAt(0),B,F,D,E,J,I;if(32===C)A="";else if(34===C)A=16===q?k?a(p(f(l,b(g[y].substring(1,A.length-1))),e,k)):"":
+t&8&&!(q&q-1)?A:"";else if("inherit"!==A){if(J=n.cssLitGroup){var L;if(!(L=n.cssLitMap)){L={};for(var M=J.length;0<=--M;)for(var Y=J[M],U=Y.length;0<=--U;)L[Y[U]]=d;L=n.cssLitMap=L}J=L}else J=d;if(I=J,I[x(A)]!==d)if(35===C&&/^#(?:[0-9a-f]{3}){1,2}$/.test(A))A=t&2?A:"";else if(48<=C&&57>=C)A=t&1?A:"";else if(B=A.charCodeAt(1),F=A.charCodeAt(2),D=48<=B&&57>=B,E=48<=F&&57>=F,43===C&&(D||46===B&&E))A=t&1?(D?"":"0")+A.substring(1):"";else if(45===C&&(D||46===B&&E))A=t&4?(D?"-":"-0")+A.substring(1):t&1?
+"0":"";else if(46===C&&D)A=t&1?"0"+A:"";else if('url("'===A.substring(0,5))A=k&&t&16?a(p(f(l,g[y].substring(5,A.length-2)),e,k)):"";else if("("===A.charAt(A.length-1))a:{J=g;L=y;A=1;M=L+1;for(C=J.length;M<C&&A;)Y=J[M++],A+=")"===Y?-1:/^[^"']*\($/.test(Y);if(!A)for(A=J[L].toLowerCase(),C=x(A),J=J.splice(L,M-L,""),L=n.cssFns,M=0,Y=L.length;M<Y;++M)if(L[M].substring(0,C.length)==C){J[0]=J[J.length-1]="";H(L[M],J,k,l);A=A+J.join(" ")+")";break a}A=""}else A=u&&/^-?[a-z_][\w\-]*$/.test(A)&&!/__$/.test(A)?
+m&&512===u?g[y]+m:1024===u&&c[A]&&"number"===typeof c[A].oa?A:"":/^\w+$/.test(A)&&64===q&&t&8?v+1===z?(g[v]=g[v].substring(0,g[v].length-1)+" "+A+'"',""):(v=z,'"'+A+'"'):""}A&&(g[z++]=A)}1===z&&'url("about:blank")'===g[0]&&(z=0);g.length=z}else g.length=0}}();var E=/^(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)$/,
D={};D[">"]=D["+"]=D["~"]=D;k=function(a,b,d){function e(e,l){function m(d,e,c){var k,l,m,p,t,u=!0;k="";d<e&&((t=a[d],"*"===t)?(++d,k=t):/^[a-zA-Z]/.test(t)&&(l=g(t.toLowerCase(),[]))&&("tagName"in l&&(t=l.tagName),++d,k=t));for(p=m=l="";u&&d<e;++d)if(t=a[d],"#"===t.charAt(0))/^#_|__$|[^\w#:\-]/.test(t)?u=!1:l+=t+f;else if("."===t)++d<e&&/^[0-9A-Za-z:_\-]+$/.test(t=a[d])&&!/^_|__$/.test(t)?l+="."+t:u=!1;else if(d+1<e&&"["===a[d]){++d;var v=a[d++].toLowerCase();t=q.m[k+"::"+v];t!==+t&&(t=q.m["*::"+
v]);var y;b.ia?(y=b.ia(k,v),"string"!==typeof y&&(u=!1,y=v),u&&t!==+t&&(t=q.d.NONE)):(y=v,t!==+t&&(u=!1));var x=v="",H=!1;/^[~^$*|]?=$/.test(a[d])&&(v=a[d++],x=a[d++],/^[0-9A-Za-z:_\-]+$/.test(x)?x='"'+x+'"':"]"===x&&(x='""',--d),/^"([^\"\\]|\\.)*"$/.test(x)||(u=!1),(H="i"===a[d])&&++d);"]"!==a[d]&&(++d,u=!1);switch(t){case q.d.CLASSES:case q.d.LOCAL_NAME:case q.d.NONE:break;case q.d.GLOBAL_NAME:case q.d.ID:case q.d.IDREF:"="!==v&&"~="!==v&&"$="!==v||'""'==x||H?"|="===v||""===v||(u=!1):x='"'+x.substring(1,
x.length-1)+f+'"';break;case q.d.URI:case q.d.URI_FRAGMENT:""!==v&&(u=!1);break;default:u=!1}u&&(m+="["+y.replace(/[^\w-]/g,"\\$&")+v+x+(H?" i]":"]"))}else if(d<e&&":"===a[d])if(t=a[++d],E.test(t))p+=":"+t;else break;else break;d!==e&&(u=!1);u&&(d=(k+l).replace(/[^ .*#\w-]/g,"\\$&")+m+p+c)&&n.push(d);return u}" "===a[e]&&++e;l-1!==e&&" "===a[l]&&--l;for(var n=[],p=e,t=!0,u=e;t&&u<l;++u){var v=a[u];if(D[v]===D||" "===v)m(p,u,v)?p=u+1:t=!1}m(p,l,"")||(t=!1);return t?(n.length&&(p=n.join(""),null!==
c&&(p="."+c+" "+p),k.push(p)),!0):!d||d(a.slice(e,l))}var c=b.na,f=b.L,g=b.Aa,k=[],l=0,m,n=0,p;for(m=0;m<a.length;++m)(p=a[m],"("==p||"["==p?(++n,0):")"==p||"]"==p?(n&&--n,0):" "==a[m]&&(n||D[a[m-1]]===D||D[a[m+1]]===D))||(a[l++]=a[m]);a.length=l;l=a.length;for(m=n=0;m<l;++m)if(","===a[m]){if(!e(n,m))return null;n=m+1}return e(n,l)?k:null};(function(){var a=/^\w/,b=/^(?:(?:(?:(?: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;
-m=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?b.test(d)?a.test(d)?d:"not all , "+d:"not all":""}})();(function(){function a(a){var b=/^\s*[']([^']*)[']\s*$/,d=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,e=/^\s*url\s*[(][']([^']*)['][)]\s*$/,c=/^\s*url\s*[(]([^)]*)[)]\s*$/,f;return(f=/^\s*["]([^"]*)["]\s*$/.exec(a))||(f=b.exec(a))||(f=d.exec(a))||(f=e.exec(a))||(f=c.exec(a))?f[1]:null}function b(d,e,c,l,t,u,q){function v(){z=
-H.length&&null===H[H.length-1]}var y=void 0,x=q||[0],H=[],z=!1;n(e,{startStylesheet:function(){y=[]},endStylesheet:function(){},startAtrule:function(e,g){if(z)e=null;else if("@media"===e)y.push("@media"," ",m(g));else if("@keyframes"===e||"@-webkit-keyframes"===e){var k=g[0];1!==g.length||/__$|[^\w\-]/.test(k)?e=null:(y.push(e," ",k+c.L),e="@keyframes")}else if("@import"===e&&0<g.length)if(e=null,"function"===typeof u){var n=m(g.slice(1));if("not all"!==n){++x[0];var q=[];y.push(q);var v=p(f(d,a(g[0])),
-function(a){var d=b(v,a.qa,c,l,t,u,x);--x[0];a=n?{toString:function(){return"@media "+n+" {"+d.result+"}"}}:d.result;q[0]=a;u(a,!!x[0])},t)}}else window.console&&window.console.log("@import "+g.join(" ")+" elided");z=!e;H.push(e)},endAtrule:function(){H.pop();z||y.push(";");v()},startBlock:function(){z||y.push("{")},endBlock:function(){z||(y.push("}"),z=!0)},startRuleset:function(a){if(!z){var b=void 0;"@keyframes"===H[H.length-1]?(b=a.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
+m=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?b.test(d)?a.test(d)?d:"not all , "+d:"not all":""}})();(function(){function a(a){var b=/^\s*[']([^']*)[']\s*$/,d=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,e=/^\s*url\s*[(][']([^']*)['][)]\s*$/,c=/^\s*url\s*[(]([^)]*)[)]\s*$/,f;return(f=/^\s*["]([^"]*)["]\s*$/.exec(a))||(f=b.exec(a))||(f=d.exec(a))||(f=e.exec(a))||(f=c.exec(a))?f[1]:null}function b(d,e,c,l,t,q,u){function v(){z=
+H.length&&null===H[H.length-1]}var y=void 0,x=u||[0],H=[],z=!1;n(e,{startStylesheet:function(){y=[]},endStylesheet:function(){},startAtrule:function(e,g){if(z)e=null;else if("@media"===e)y.push("@media"," ",m(g));else if("@keyframes"===e||"@-webkit-keyframes"===e){var k=g[0];1!==g.length||/__$|[^\w\-]/.test(k)?e=null:(y.push(e," ",k+c.L),e="@keyframes")}else if("@import"===e&&0<g.length)if(e=null,"function"===typeof q){var n=m(g.slice(1));if("not all"!==n){++x[0];var u=[];y.push(u);var v=p(f(d,a(g[0])),
+function(a){var d=b(v,a.qa,c,l,t,q,x);--x[0];a=n?{toString:function(){return"@media "+n+" {"+d.result+"}"}}:d.result;u[0]=a;q(a,!!x[0])},t)}}else window.console&&window.console.log("@import "+g.join(" ")+" elided");z=!e;H.push(e)},endAtrule:function(){H.pop();z||y.push(";");v()},startBlock:function(){z||y.push("{")},endBlock:function(){z||(y.push("}"),z=!0)},startRuleset:function(a){if(!z){var b=void 0;"@keyframes"===H[H.length-1]?(b=a.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
z=!b,b&&(b=b[0].replace(/ +/g,""))):(a=k(a,c),a&&a.length?b=a.join(", "):z=!0);z||y.push(b,"{")}H.push(null)},endRuleset:function(){H.pop();z||y.push("}");v()},declaration:function(a,b){if(!z){var e=!1,f=b.length;2<=f&&"!"===b[f-2]&&"important"===b[f-1].toLowerCase()&&(e=!0,b.length-=2);g(a,b,l,d,c.L);b.length&&y.push(a,":",b.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return y.join("")}},va:!!x[0]}}l=function(a,d,e,c){return b(a,d,e,c,void 0,void 0).result.toString()}})()})();
"undefined"!==typeof window&&(window.sanitizeCssProperty=g,window.sanitizeCssSelectorList=k,window.sanitizeStylesheet=l,window.sanitizeMediaQuery=m);var n,p;(function(){function a(a,d,e,c,f){for(var g=d++;d<e&&"{"!==a[d]&&";"!==a[d];)++d;if(d<e&&(f||";"===a[d])){f=g+1;var k=d;f<e&&" "===a[f]&&++f;k>f&&" "===a[k-1]&&--k;c.startAtrule&&c.startAtrule(a[g].toLowerCase(),a.slice(f,k));d="{"===a[d]?b(a,d,e,c):d+1;c.endAtrule&&c.endAtrule()}return d}function b(d,c,f,g){++c;for(g.startBlock&&g.startBlock();c<
f;){var k=d[c].charAt(0);if("}"==k){++c;break}c=" "===k||";"===k?c+1:"@"===k?a(d,c,f,g,!1):"{"===k?b(d,c,f,g):e(d,c,f,g)}g.endBlock&&g.endBlock();return c}function e(a,b,d,e){var f=b,k=c(a,b,d,!0);if(0>k)return k=~k,k===f?k+1:k;var l=a[k];if("{"!==l)return k===f?k+1:k;b=k+1;k>f&&" "===a[k-1]&&--k;for(e.startRuleset&&e.startRuleset(a.slice(f,k));b<d;){l=a[b];if("}"===l){++b;break}b=" "===l?b+1:g(a,b,d,e)}e.endRuleset&&e.endRuleset();return b}function c(a,b,d,e){for(var c,f=[],g=-1;b<d;++b)if(c=a[b].charAt(0),
@@ -7137,20 +7137,21 @@ mxResources.get("fitToSheetsDown"));H.appendChild(g);B.appendChild(F);B.appendCh
"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));m.appendChild(g);var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","100 %");M.style.width="60px";m.appendChild(M);e.appendChild(m);g=document.createElement("div");g.style.cssText="text-align:right;margin:62px 0 0 0;";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
m.className="geBtn";a.editor.cancelFirst&&g.appendChild(m);a.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947-how-to-print-")}),t.className="geBtn",g.appendChild(t));mxClient.IS_CHROMEAPP||(t=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),t.className="geBtn",g.appendChild(t));t=mxUtils.button(mxResources.get(mxClient.IS_CHROMEAPP?"ok":"print"),function(){a.hideDialog();d(!0)});t.className=
"geBtn gePrimaryBtn";g.appendChild(t);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};
-var LinkDialog=function(a,c,f,d){var b=document.createElement("div");mxUtils.write(b,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var g=document.createElement("input");g.setAttribute("value",c);g.setAttribute("placeholder",mxResources.get("dragUrlsHere"));
-g.setAttribute("type","text");g.style.marginTop="6px";g.style.width="400px";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=
-(mxClient.IS_VML?0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){g.value="";g.focus()});e.appendChild(g);e.appendChild(c);b.appendChild(e);var k=mxUtils.button(f,function(){a.hideDialog();d(g.value,LinkDialog.selectedDocs)});k.className="geBtn gePrimaryBtn";this.init=function(){g.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null);if(Graph.fileSupport){var c=b.parentNode,
-d=null;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(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=a.highlightElement(c));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(g.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),
-k.click());a.stopPropagation();a.preventDefault()}),!1)}};f=document.createElement("div");f.style.marginTop="14px";f.style.textAlign="right";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&f.appendChild(e);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?
-(b=DriveClient.prototype.oldAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(b=DriveClient.prototype.newAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);g.value=b}else LinkDialog.selectedDocs=null;g.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&(c=mxUtils.button(mxResources.get("googlePlus"),
-function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),d=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(c).addView(d).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);
-"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0);a.movePickersToTop()}))}),c.className="geBtn",f.appendChild(c));"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&(c=mxUtils.button(mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){g.value=
-a[0].link}})}),c.className="geBtn",f.appendChild(c));"undefined"!=typeof WL&&"undefined"!=typeof WL.fileDialog&&null!=a.oneDrive&&(c=mxUtils.button(mxResources.get("oneDrive"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.oneDrive.execute(mxUtils.bind(this,function(b){null!=b&&(a.spinner.stop(),WL.fileDialog({mode:"open",select:"single"}).then(function(a){null!=a&&null!=a.data&&null!=a.data.files&&0<a.data.files.length&&(g.value=a.data.files[0].link)},function(a){}))}))}),
-c.className="geBtn",f.appendChild(c));mxEvent.addListener(g,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(g.value,LinkDialog.selectedDocs))});f.appendChild(k);a.editor.cancelFirst||f.appendChild(e);b.appendChild(f);this.container=b},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.style.width="170px";f.style.height=
-"219px";f.setAttribute("src",IMAGE_PATH+"/logo-flat.png");c.appendChild(f);mxUtils.br(c);f=document.createElement("small");f.innerHTML="v "+EditorUi.VERSION;f.style.color="#505050";c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=document.createElement("small");f.style.color="#505050";f.innerHTML='&copy; 2005-2017 <a href="https://www.jgraph.com/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';c.appendChild(f);mxEvent.addListener(c,"click",function(c){"A"!=mxEvent.getSource(c).nodeName&&
-a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedbackToDrawIo"));f.style.fontSize="18px";f.style.marginBottom="18px";c.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(f);var d=document.createElement("input");d.setAttribute("type","text");d.style.marginTop="6px";d.style.width=
-"600px";var b=mxUtils.button(mxResources.get("sendMessage"),function(){var b=(g.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(d.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+
-"&body="+encodeURIComponent("Feedback:\n"+l.value+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});b.className="geBtn gePrimaryBtn";b.setAttribute("disabled","disabled");var e=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
+var LinkDialog=function(a,c,f,d){function b(a,b,c){c=mxUtils.button("",c);c.className="geBtn";c.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";b.style.width="26px";b.setAttribute("src",a);b.setAttribute("valign","bottom");c.style.minWidth="42px";c.appendChild(b);m.appendChild(c)}var e=document.createElement("div");mxUtils.write(e,mxResources.get("editLink")+":");var g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor=
+"transparent";g.style.whiteSpace="nowrap";g.style.textOverflow="clip";g.style.cursor="default";mxClient.IS_VML||(g.style.paddingRight="20px");var k=document.createElement("input");k.setAttribute("value",c);k.setAttribute("placeholder",mxResources.get("dragUrlsHere"));k.setAttribute("type","text");k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.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?0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){k.value="";k.focus()});g.appendChild(k);g.appendChild(c);e.appendChild(g);var l=mxUtils.button(f,function(){a.hideDialog();
+d(k.value,LinkDialog.selectedDocs)});l.className="geBtn gePrimaryBtn";this.init=function(){k.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null);if(Graph.fileSupport){var b=e.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&
+(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(k.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),l.click());a.stopPropagation();a.preventDefault()}),!1)}};var m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+f.className="geBtn";a.editor.cancelFirst&&m.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(b=DriveClient.prototype.oldAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(b=DriveClient.prototype.newAppHostname,
+b="https://"+b+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);k.value=b}else LinkDialog.selectedDocs=null;k.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&b(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=
+gapi.auth.getToken().access_token,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),d=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(c).addView(d).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);
+"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0);a.movePickersToTop()}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){k.value=a[0].link}})});
+"undefined"!=typeof WL&&"undefined"!=typeof WL.fileDialog&&null!=a.oneDrive&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){WL.fileDialog({mode:"open",select:"single"}).then(function(a){null!=a&&null!=a.data&&null!=a.data.files&&0<a.data.files.length&&(k.value=a.data.files[0].link)},function(a){})});null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],d=a[2];a=a.slice(3,
+a.length).join("/");k.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a}})});mxEvent.addListener(k,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(k.value,LinkDialog.selectedDocs))});m.appendChild(l);a.editor.cancelFirst||m.appendChild(f);e.appendChild(m);this.container=e},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width",
+"151");f.style.width="170px";f.style.height="219px";f.setAttribute("src",IMAGE_PATH+"/logo-flat.png");c.appendChild(f);mxUtils.br(c);f=document.createElement("small");f.innerHTML="v "+EditorUi.VERSION;f.style.color="#505050";c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=document.createElement("small");f.style.color="#505050";f.innerHTML='&copy; 2005-2017 <a href="https://www.jgraph.com/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';c.appendChild(f);mxEvent.addListener(c,
+"click",function(c){"A"!=mxEvent.getSource(c).nodeName&&a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedbackToDrawIo"));f.style.fontSize="18px";f.style.marginBottom="18px";c.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(f);var d=document.createElement("input");d.setAttribute("type",
+"text");d.style.marginTop="6px";d.style.width="600px";var b=mxUtils.button(mxResources.get("sendMessage"),function(){var b=(g.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(d.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+
+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+l.value+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});b.className="geBtn gePrimaryBtn";b.setAttribute("disabled","disabled");var e=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
mxEvent.addListener(d,"change",function(){0<d.value.length&&0<e.test(d.value)?b.removeAttribute("disabled"):b.setAttribute("disabled","disabled")});mxEvent.addListener(d,"keyup",function(){0<d.value.length&&e.test(d.value)?b.removeAttribute("disabled"):b.setAttribute("disabled","disabled")});c.appendChild(d);this.init=function(){d.focus()};var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;f=document.createElement("p");f.style.marginTop=
"14px";f.appendChild(g);var k=document.createElement("span");mxUtils.write(k," "+mxResources.get("includeCopyOfMyDiagram"));f.appendChild(k);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});c.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("feedback"));c.appendChild(f);var l=document.createElement("textarea");l.style.resize="none";l.style.width="600px";l.style.height="140px";l.style.marginTop="6px";l.setAttribute("placeholder",mxResources.get("commentsNotes"));
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;
@@ -7297,15 +7298,15 @@ 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 u=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 u.apply(this,arguments)}})();(function(){EditorUi.VERSION="6.2.4";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
-EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.enableLogging=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!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(p){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c=a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=
-null!==c.match("image/jpeg")}catch(n){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=
-function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),b=0;b<a.length;b++)"picker modal-dialog picker-dialog"==a[b].className&&(a[b].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return mxClient.IS_FF&&this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
-function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),e=d.spin;d.spin=function(c,f){var k=!1;this.active||(e.call(this,c),this.active=!0,null!=f&&(k=document.createElement("div"),k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize="9pt",k.style.padding="6px",
-k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,a)+"px",k.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),k.innerHTML=f+"...",c.appendChild(k),d.status=k,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(k.style.left=Math.round(Math.max(0,a-k.offsetWidth/
-2))+"px",k.style.top=Math.round(Math.max(0,b+70-k.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,f)}));this.stop();return a}),k=!0);return k};var f=d.stop;d.stop=function(){f.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=f;f+=b;return a.substring(c,f)}function e(a){a=d(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var f=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=e(a);var k=d(a,4);if(null!=b&&b(f-8,k,c))break;value=d(a,c);d(a,4);if("IEND"==k)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(n){}return!1};
+[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 u=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 u.apply(this,arguments)}})();(function(){EditorUi.VERSION="6.2.5";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.enableLogging=!0;EditorUi.prototype.pdfPageExport=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!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(p){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c=
+a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(n){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};
+EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),b=0;b<a.length;b++)"picker modal-dialog picker-dialog"==a[b].className&&(a[b].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return mxClient.IS_FF&&this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};
+EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),e=d.spin;d.spin=function(c,f){var k=!1;this.active||(e.call(this,c),this.active=!0,null!=f&&(k=document.createElement("div"),k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize=
+"9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,a)+"px",k.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),k.innerHTML=f+"...",c.appendChild(k),d.status=k,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(k.style.left=Math.round(Math.max(0,
+a-k.offsetWidth/2))+"px",k.style.top=Math.round(Math.max(0,b+70-k.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,f)}));this.stop();return a}),k=!0);return k};var f=d.stop;d.stop=function(){f.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=f;f+=b;return a.substring(c,f)}function e(a){a=d(a,
+4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var f=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=e(a);var k=d(a,4);if(null!=b&&b(f-8,k,c))break;value=d(a,c);d(a,4);if("IEND"==k)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(n){}return!1};
var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("&lt;mxfile ");if(0<=d){var e=b.lastIndexOf("&lt;/mxfile&gt;");e>d&&(c=b.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),k=this.editor.extractGraphModel(f.documentElement,null!=this.pages),c=null!=k?mxUtils.getXml(k):""}catch(u){}return c};EditorUi.prototype.validateFileData=
function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+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")),
@@ -7324,87 +7325,87 @@ e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![end
!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&&null!=
b&&(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.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||
/(\.svg)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var k=this.getBaseFilename(),g=k+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(g,a,l,"text/xml")}else if("html"==a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,k),this.saveData(g,a,l,"text/html");
-else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a&&(g=k+".png"),this.saveRequest(g,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var k=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return k}catch(C){this.handleError(C)}}));else{var m=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var p=this.editor.graph.background;p==mxConstants.NONE&&(p=null);var q=this.editor.graph.getSvg(p,null,null,null,null,d);c&&this.editor.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=
-k+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),d)}}catch(z){this.handleError(z)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=0;k<this.pages.length;k++)if(this.pages[k]==
-this.currentPage){f="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+d+"&embedXml="+e+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();
-var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);null!=c&&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{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);
-a.addListener("contentChanged",this.descriptorChangedListener);this.descriptorChanged();a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus(mxResources.get("readOnly")));this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus());
-this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;if(this.enableLogging&&!this.isOffline())try{var e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e.src=f+"/log?msg=storageMode:"+encodeURIComponent(a.getMode())+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(u){}if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(u){}}catch(u){null!=
-window.console&&console.log("error in fileLoaded:",a,u);if(this.enableLogging&&!this.isOffline())try{e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"",e.src=f+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=u&&null!=u.message?":err:"+encodeURIComponent(u.message):"")+(null!=u&&null!=u.stack?"&stack="+encodeURIComponent(u.stack):"")}catch(t){}this.handleError(u,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!=c?this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,f,g){};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.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],k=f.data;if(null!=k){var k=this.convertDataUri(k),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
-"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+k,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(k=this.stringToCells(this.editor.graph.decompress(f.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;
-c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");g.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("align",
-"top");m.setAttribute("border","0");m.className="geButton";m.style.marginRight="1px";m.style.marginTop="-1px";l.appendChild(m);var x=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=x?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==k?k.setAttribute("title",mxResources.get("libraryTooltip")):
-k.removeAttribute("title")}));if(a.isEditable()){var A=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),z=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=D&&null!=D.parentNode&&D.parentNode.removeChild(D),D=m.cloneNode(!1),D.setAttribute("src",Editor.spinImage),D.setAttribute("title",mxResources.get("saving")),D.style.cursor="default",D.style.marginRight="2px",D.style.marginTop="-2px",l.insertBefore(D,
-l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=D&&null!=D.parentNode&&(D.parentNode.removeChild(D),g.style.paddingRight=18*l.childNodes.length+"px")})):null==x&&(x=m.cloneNode(!1),x.setAttribute("src",IMAGE_PATH+"/download.png"),x.setAttribute("title",mxResources.get("save")),l.insertBefore(x,l.firstChild),mxEvent.addListener(x,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==
-LocalLibrary,!0);x.parentNode.removeChild(x);x=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,f){a=A.cloneCells(A.model.getTopmostCells(a));for(var g=0;g<a.length;g++){var l=A.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.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);z(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),E=mxUtils.bind(this,function(a){if(A.isSelectionEmpty())A.getRubberband().isActive()?(A.getRubberband().execute(a),A.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=A.getSelectionCells(),c=A.view.getBounds(b),d=A.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=A.view.translate.x;
-c.y-=A.view.translate.y;F(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",A.panningManager.stop(),A.autoScroll=!1,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!1),
-null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,A.panningManager.stop(),A.graphHandler.reset(),A.isMouseDown=!1,A.autoScroll=!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){A.isMouseDown&&
-null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",A.autoScroll=!0,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!0),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";
-a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.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,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
-this.convertDataUri(c),t=[new mxCell("",new mxGeometry(0,0,m,n),t)];t[0].vertex=!0;F(t,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var q=JSON.parse(mxUtils.getTextContent(c.documentElement));f(q,k);b=b.concat(q);z(a);this.spinner.stop();p=!0}catch(G){}else if("mxfile"==c.documentElement.nodeName)try{q=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),
-t=this.stringToCells(this.editor.graph.decompress(q)),F(t,new mxRectangle(0,0,m,n),a),p=!0}catch(G){}p||(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(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));
-m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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)})),l.insertBefore(c,l.firstChild));var D=null;mxEvent.addListener(m,"click",E)}g.appendChild(l);g.style.paddingRight=18*l.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"),k=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(f=mxResources.get("cancel"),k=function(){d();e.retry()}),"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 g=window.location.hash;null!=g&&"#G"==g.substring(0,2)&&(g=g.substring(2),a+=' <a href="https://drive.google.com/open?id='+g+'" target="_blank">'+mxResources.get("tryOpeningViaThisPage")+"</a>")}else e.code==App.ERROR_TIMEOUT?a=mxResources.get("timeout"):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,k)}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.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
-return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename,e=d.lastIndexOf(".");0<e&&(d=d.substring(0,e));e="jpeg"==c?"jpg":c;d+="."+e;a=this.createImageDataUri(a,b,c);this.saveData(d,e,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&
-8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(c),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=
-new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var f=document.createElement("a");if("undefined"!==typeof f.download||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));"undefined"!==typeof f.download?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);
-try{f.click(),window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.parentNode.removeChild(f)}catch(u){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=
-b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),g=0;g<e;++g){for(var k=1024*g,l=Math.min(k+1024,d),y=Array(l-k),x=0;k<l;++x,++k)y[x]=c[k].charCodeAt(0);f[g]=new Uint8Array(y)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e){e=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG)f=window.open("about:blank"),
-null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());else if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('<html><img src="data:'+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),f.document.close())}else f=window.open("data:"+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else e==App.MODE_DEVICE?
-this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(v){this.handleError(v)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e,null,null,4);this.showDialog(b.container,380,5>this.getServiceCount(!1)-1?270:390,!0,!0);b.init()};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,
-function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}))};EditorUi.prototype.saveRequest=function(a,b,c){var d=!mxClient.IS_IOS||!navigator.standalone;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var e=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||"_blank"==d?"0":"1");null!=e&&(d==App.MODE_DEVICE||"_blank"==d?e.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){this.spinner.spin(document.body,mxResources.get("saving"))&&
-e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),a,f,!0,d,c)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,d,null,null,4);this.showDialog(a.container,380,
-5>this.getServiceCount(!1)-1?270:390,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,g,t,v){if(this.spinner.spin(document.body,mxResources.get("export"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;k=b?null:this.editor.graph.background;k==mxConstants.NONE&&(k=null);null==k&&0==b&&(k="#ffffff");var l=this.editor.graph.getSvg(k,a,g,t,null,c);d&&this.editor.addSvgShadow(l);
-a=this.getCurrentFile();var m=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=m.lastIndexOf(".");0<a&&(m=m.substring(0,a));var m=m+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,v));var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,l,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,n,this.thumbImageCache)):n(l)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e){var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled",
-"disabled");a.appendChild(f);mxUtils.write(a,b);e||mxUtils.br(a);return f};EditorUi.prototype.addLinkSection=function(a,b){function c(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");
-d.style.width="100px";d.style.marginLeft="4px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&
-(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();g.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width=
-"22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,t){var k=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),
-e&&l.push("edit=_blank"),f&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&l.push("page="+a);break}a=!0;null!=g?c="#U"+encodeURIComponent(g):(k=this.getCurrentFile(),t||null==k||k.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
-(c="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,t,v,y,x){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=e);"auto"!==d&&(l.target=d);v||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||
-100==c||(l.zoom=c/100);c=[];g&&(c.push("pages"),l.resize=!0,null!=this.pages&&null!=this.currentPage&&(l.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),l.resize=!0);t&&c.push("layers");0<c.length&&(v&&c.push("lightbox"),l.toolbar=c.join(" "));y&&(l.edit=null!=a?a:"_blank");null!=a?l.url=a:l.xml=this.getFileData(!0,null,null,null,null,!g);b='<div class="mxgraph" style="'+(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(l))+
-'"></div>';k=0<k.length?"s="+k.join(";"):"";a=null!=a?"fetch="+encodeURIComponent(a):"";x(b,'<script type="text/javascript" src="'+(0<k.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1&"+k:"https://www.draw.io/embed2.js?"+k)+"&"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");
-mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value",
-"copy");g.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(l=document.createElement("a"),l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),
-g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),A=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var B=document.createElement("input");B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight=
-"12px";B.value="100%";e.appendChild(B);var z=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,F=F=this.addCheckbox(e,mxResources.get("allPages"),g,!g),E=this.addCheckbox(e,mxResources.get("layers"),!0),D=this.addCheckbox(e,mxResources.get("lightbox"),!0),C=this.addCheckbox(e,mxResources.get("showEditButton"),!0);C.style.marginLeft="24px";C.style.marginBottom="16px";mxEvent.addListener(D,"change",function(){D.checked?C.removeAttribute("disabled"):C.setAttribute("disabled",
-"disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,A.checked,B.value,n.getTarget(),n.getColor(),z.checked,F.checked,E.checked,D.checked,C.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
-g.appendChild(k);var l=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941-how-to-publicly-publish-a-copy-of-your-draw-io-diagram";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384-how-to-publicly-publish-a-copy-of-your-draw-io-diagram-stored-in-google-drive",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);g.appendChild(m);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));
-m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var p=null,q=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),p=document.createElement("input"),
-p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",g.appendChild(p),mxUtils.write(g,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=d+"px",g.appendChild(q),mxUtils.br(g);var z=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var F=null;
-if(null==l||l.constructor!=window.DriveFile||b)F=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var E=this.addCheckbox(g,mxResources.get("lightbox"),!0),D=this.addCheckbox(g,mxResources.get("showEditButton"),!0);D.style.marginLeft="24px";var C=this.addCheckbox(g,mxResources.get("layers"),!0);C.style.marginLeft=D.style.marginLeft;C.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?(C.removeAttribute("disabled"),D.removeAttribute("disabled")):(C.setAttribute("disabled",
-"disabled"),D.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(z.getTarget(),z.getColor(),null==F?!0:F.checked,E.checked,D.checked,C.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):z.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,
-b,c){var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0);g.style.marginBottom="16px";a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!f.checked,
-g.checked)}),null,a,b);this.showDialog(a.container,300,146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=this.editor.graph,l=280,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(m);mxUtils.write(g,mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";
-n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";g.appendChild(n);mxUtils.write(g,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value="0";g.appendChild(p);mxUtils.br(g);var q=this.addCheckbox(g,mxResources.get("transparentBackground"),k.background==mxConstants.NONE||null==k.background),z=this.addCheckbox(g,mxResources.get("selectionOnly"),
-!1,k.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.setAttribute("type","checkbox");f&&(g.appendChild(F),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),l+=26);k.isSelectionEmpty()?F.setAttribute("disabled","disabled"):(F.setAttribute("checked","checked"),F.defaultChecked=!0);var E=this.addCheckbox(g,mxResources.get("shadow"),k.shadowVisible),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.setAttribute("type",
-"checkbox");!this.isOffline()&&this.canvasSupported||D.setAttribute("disabled","disabled");b&&(g.appendChild(D),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),l+=26);var C=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0);a=null!=this.pages&&1<this.pages.length;var K=K=this.addCheckbox(g,mxResources.get("allPages"),a,!a);K.style.marginLeft="24px";K.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?K.removeAttribute("disabled"):K.setAttribute("disabled",
-"disabled")});c=new CustomDialog(this,g,mxUtils.bind(this,function(){e(n.value,q.checked,!z.checked,E.checked,C.checked,D.checked,p.value,F.checked,!K.checked)}),null,c,d);this.showDialog(c.container,320,l,!0,!0);n.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showExportJpgDialog=function(a,b){var c=document.createElement("div");c.style.whiteSpace="nowrap";var d=this.editor.graph,e=document.createElement("h3");
-mxUtils.write(e,mxResources.get("formatJpg"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(e);mxUtils.write(c,mxResources.get("zoom")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginRight="16px";f.style.width="60px";f.style.marginLeft="4px";f.style.marginBottom="4px";f.value="100%";c.appendChild(f);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type",
-"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=document.createElement("input");l.style.marginTop="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");c.appendChild(l);mxUtils.write(c,mxResources.get("crop"));mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=
-!0);var y=this.addCheckbox(c,mxResources.get("shadow"),d.shadowVisible),d=document.createElement("input");d.style.marginTop="16px";d.style.marginRight="8px";d.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||d.setAttribute("disabled","disabled");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,!k.checked,y.checked,g.value,l.checked)}),null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||
-mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(k)}var l=this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,
-!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addCheckbox(f,mxResources.get("showEditButton"),!0);B.style.marginLeft="24px";var z=1<g.model.getChildCount(g.model.getRoot()),F=this.addCheckbox(f,mxResources.get("layers"),z,!z);F.style.marginLeft=B.style.marginLeft;F.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?(z&&F.removeAttribute("disabled"),B.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),B.setAttribute("disabled",
-"disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,B.checked,F.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=k+".png":"jpeg"==a&&(g=k+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var k=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return k}catch(C){this.handleError(C)}}));else{var m=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):
+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var p=this.editor.graph.background;p==mxConstants.NONE&&(p=null);var q=this.editor.graph.getSvg(p,null,null,null,null,d);c&&this.editor.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a))})))}else g=k+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),d)}}catch(z){this.handleError(z)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=
+0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){f="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+d+"&embedXml="+e+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();
+this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);null!=c&&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{this.setCurrentFile(a);a.addListener("descriptorChanged",
+this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);this.descriptorChanged();a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus(mxResources.get("readOnly")));this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==
+window.top&&window.focus());this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;if(this.enableLogging&&!this.isOffline()&&null!=a.getMode())try{var e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e.src=f+"/log?msg=storageMode:"+encodeURIComponent(a.getMode())+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(u){}if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),
+mode:a.getMode()})}catch(u){}}catch(u){null!=window.console&&console.log("error in fileLoaded:",a,u);if(this.enableLogging&&!this.isOffline())try{e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"",e.src=f+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=u&&null!=u.message?":err:"+encodeURIComponent(u.message):"")+(null!=u&&null!=u.stack?"&stack="+encodeURIComponent(u.stack):"")}catch(t){}this.handleError(u,
+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!=c?this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,f,g){};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.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],k=f.data;if(null!=k){var k=this.convertDataUri(k),
+g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+k,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(k=this.stringToCells(this.editor.graph.decompress(f.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,
+a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");g.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",
+mxResources.get("close"));m.setAttribute("align","top");m.setAttribute("border","0");m.className="geButton";m.style.marginRight="1px";m.style.marginTop="-1px";l.appendChild(m);var x=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=x?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==
+k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var A=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),z=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=D&&null!=D.parentNode&&D.parentNode.removeChild(D),D=m.cloneNode(!1),D.setAttribute("src",Editor.spinImage),D.setAttribute("title",mxResources.get("saving")),D.style.cursor="default",
+D.style.marginRight="2px",D.style.marginTop="-2px",l.insertBefore(D,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=D&&null!=D.parentNode&&(D.parentNode.removeChild(D),g.style.paddingRight=18*l.childNodes.length+"px")})):null==x&&(x=m.cloneNode(!1),x.setAttribute("src",IMAGE_PATH+"/download.png"),x.setAttribute("title",mxResources.get("save")),l.insertBefore(x,l.firstChild),mxEvent.addListener(x,"click",mxUtils.bind(this,
+function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);x.parentNode.removeChild(x);x=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,f){a=A.cloneCells(A.model.getTopmostCells(a));for(var g=0;g<a.length;g++){var l=A.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.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);z(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),E=mxUtils.bind(this,function(a){if(A.isSelectionEmpty())A.getRubberband().isActive()?(A.getRubberband().execute(a),A.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=A.getSelectionCells(),
+c=A.view.getBounds(b),d=A.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=A.view.translate.x;c.y-=A.view.translate.y;F(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",
+A.panningManager.stop(),A.autoScroll=!1,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!1),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,A.panningManager.stop(),A.graphHandler.reset(),A.isMouseDown=!1,A.autoScroll=
+!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",A.autoScroll=!0,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!0),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,
+"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.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,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),t=[new mxCell("",new mxGeometry(0,0,m,n),t)];t[0].vertex=!0;F(t,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var q=JSON.parse(mxUtils.getTextContent(c.documentElement));
+f(q,k);b=b.concat(q);z(a);this.spinner.stop();p=!0}catch(G){}else if("mxfile"==c.documentElement.nodeName)try{q=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),t=this.stringToCells(this.editor.graph.decompress(q)),F(t,new mxRectangle(0,0,m,n),a),p=!0}catch(G){}p||(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(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);
+m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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)})),l.insertBefore(c,l.firstChild));var D=null;mxEvent.addListener(m,
+"click",E)}g.appendChild(l);g.style.paddingRight=18*l.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"),k=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&
+(f=mxResources.get("cancel"),k=function(){d();e.retry()}),"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 g=window.location.hash;null!=g&&"#G"==
+g.substring(0,2)&&(g=g.substring(2),a+=' <a href="https://drive.google.com/open?id='+g+'" target="_blank">'+mxResources.get("tryOpeningViaThisPage")+"</a>")}else e.code==App.ERROR_TIMEOUT?a=mxResources.get("timeout"):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,k)}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.createImageDataUri=
+function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename,e=d.lastIndexOf(".");0<e&&(d=d.substring(0,e));e="jpeg"==c?"jpg":c;d+="."+e;a=this.createImageDataUri(a,b,c);this.saveData(d,
+e,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(c),
+navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var f=document.createElement("a");if("undefined"!==
+typeof f.download||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));"undefined"!==typeof f.download?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{f.click(),window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.parentNode.removeChild(f)}catch(u){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,
+a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),k=0;k<e;++k){for(var g=1024*k,l=Math.min(g+1024,d),y=Array(l-g),x=0;g<l;++x,++g)y[x]=c[g].charCodeAt(0);f[k]=new Uint8Array(y)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e){e=!mxClient.IS_IOS||!navigator.standalone;
+b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG)f=window.open("about:blank"),null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());else if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('<html><img src="data:'+c+(d?";base64,"+a:";charset=utf8,"+
+encodeURIComponent(a))+'"/></html>'),f.document.close())}else f=window.open("data:"+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(v){this.handleError(v)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e,null,null,4);this.showDialog(b.container,
+380,5>this.getServiceCount(!1)-1?270:390,!0,!0);b.init()};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}))};EditorUi.prototype.saveRequest=function(a,b,c){var d=!mxClient.IS_IOS||!navigator.standalone;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var e=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||
+"_blank"==d?"0":"1");null!=e&&(d==App.MODE_DEVICE||"_blank"==d?e.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),a,f,!0,d,c)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();
+this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,d,null,null,4);this.showDialog(a.container,380,5>this.getServiceCount(!1)-1?270:390,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,g,t,v){if(this.spinner.spin(document.body,mxResources.get("export"))){var k=this.editor.graph.isSelectionEmpty();
+c=null!=c?c:k;k=b?null:this.editor.graph.background;k==mxConstants.NONE&&(k=null);null==k&&0==b&&(k="#ffffff");var l=this.editor.graph.getSvg(k,a,g,t,null,c);d&&this.editor.addSvgShadow(l);a=this.getCurrentFile();var m=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=m.lastIndexOf(".");0<a&&(m=m.substring(0,a));var m=m+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,v));var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,l,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,n,this.thumbImageCache)):n(l)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e){var f=document.createElement("input");
+f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");a.appendChild(f);mxUtils.write(a,b);e||mxUtils.br(a);return f};EditorUi.prototype.addLinkSection=function(a,b){function c(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="4px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");
+e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();g.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width="22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,t){var k=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+
+a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),e&&l.push("edit=_blank"),f&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&l.push("page="+a);break}a=!0;null!=g?c="#U"+encodeURIComponent(g):(k=this.getCurrentFile(),t||null==k||k.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,
+null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,t,v,y,x){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=e);"auto"!==
+d&&(l.target=d);v||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(l.zoom=c/100);c=[];g&&(c.push("pages"),l.resize=!0,null!=this.pages&&null!=this.currentPage&&(l.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),l.resize=!0);t&&c.push("layers");0<c.length&&(v&&c.push("lightbox"),l.toolbar=c.join(" "));y&&(l.edit=null!=a?a:"_blank");null!=a?l.url=a:l.xml=this.getFileData(!0,null,null,null,null,!g);b='<div class="mxgraph" style="'+(f?"max-width:100%;":
+"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(l))+'"></div>';k=0<k.length?"s="+k.join(";"):"";a=null!=a?"fetch="+encodeURIComponent(a):"";x(b,'<script type="text/javascript" src="'+(0<k.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1&"+k:"https://www.draw.io/embed2.js?"+k)+"&"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=
+function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value",
+"url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(l=document.createElement("a"),
+l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),A=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var B=document.createElement("input");
+B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";e.appendChild(B);var z=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,F=F=this.addCheckbox(e,mxResources.get("allPages"),g,!g),E=this.addCheckbox(e,mxResources.get("layers"),!0),D=this.addCheckbox(e,mxResources.get("lightbox"),!0),C=this.addCheckbox(e,mxResources.get("showEditButton"),!0);C.style.marginLeft="24px";C.style.marginBottom=
+"16px";mxEvent.addListener(D,"change",function(){D.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,A.checked,B.value,n.getTarget(),n.getColor(),z.checked,F.checked,E.checked,D.checked,C.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");
+mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var l=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941-how-to-publicly-publish-a-copy-of-your-draw-io-diagram";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384-how-to-publicly-publish-a-copy-of-your-draw-io-diagram-stored-in-google-drive",m=document.createElement("div");
+m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);g.appendChild(m);n=document.createElement("a");n.style.paddingLeft=
+"12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,
+300,80,!0,!1);a.init()}))}))}var p=null,q=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",g.appendChild(p),mxUtils.write(g,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom=
+"10px",q.value=d+"px",g.appendChild(q),mxUtils.br(g);var z=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var F=null;if(null==l||l.constructor!=window.DriveFile||b)F=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var E=this.addCheckbox(g,mxResources.get("lightbox"),!0),D=this.addCheckbox(g,mxResources.get("showEditButton"),!0);D.style.marginLeft="24px";var C=this.addCheckbox(g,mxResources.get("layers"),!0);C.style.marginLeft=D.style.marginLeft;C.style.marginBottom="16px";mxEvent.addListener(E,
+"change",function(){E.checked?(C.removeAttribute("disabled"),D.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(z.getTarget(),z.getColor(),null==F?!0:F.checked,E.checked,D.checked,C.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+p.select():document.execCommand("selectAll",!1,null)):z.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(f);var g=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),
+!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!g.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=this.editor.graph,l=280,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(m);mxUtils.write(g,
+mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";g.appendChild(n);mxUtils.write(g,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value="0";g.appendChild(p);mxUtils.br(g);var q=this.addCheckbox(g,mxResources.get("transparentBackground"),
+k.background==mxConstants.NONE||null==k.background),z=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.setAttribute("type","checkbox");f&&(g.appendChild(F),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),l+=26);k.isSelectionEmpty()?F.setAttribute("disabled","disabled"):(F.setAttribute("checked","checked"),F.defaultChecked=!0);var E=this.addCheckbox(g,mxResources.get("shadow"),
+k.shadowVisible),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||D.setAttribute("disabled","disabled");b&&(g.appendChild(D),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),l+=26);var C=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0);a=null!=this.pages&&1<this.pages.length;var K=K=this.addCheckbox(g,mxResources.get("allPages"),a,!a);K.style.marginLeft="24px";
+K.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")});c=new CustomDialog(this,g,mxUtils.bind(this,function(){e(n.value,q.checked,!z.checked,E.checked,C.checked,D.checked,p.value,F.checked,!K.checked)}),null,c,d);this.showDialog(c.container,320,l,!0,!0);n.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showExportJpgDialog=
+function(a,b){var c=document.createElement("div");c.style.whiteSpace="nowrap";var d=this.editor.graph,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatJpg"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(e);mxUtils.write(c,mxResources.get("zoom")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginRight="16px";f.style.width="60px";f.style.marginLeft="4px";f.style.marginBottom="4px";f.value="100%";
+c.appendChild(f);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=document.createElement("input");l.style.marginTop="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");c.appendChild(l);mxUtils.write(c,mxResources.get("crop"));
+mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=!0);var y=this.addCheckbox(c,mxResources.get("shadow"),d.shadowVisible),d=document.createElement("input");d.style.marginTop="16px";d.style.marginRight="8px";d.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||d.setAttribute("disabled","disabled");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,!k.checked,y.checked,g.value,l.checked)}),
+null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(k)}var l=
+this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addCheckbox(f,mxResources.get("showEditButton"),!0);B.style.marginLeft="24px";var z=1<g.model.getChildCount(g.model.getRoot()),F=this.addCheckbox(f,mxResources.get("layers"),z,!z);F.style.marginLeft=B.style.marginLeft;F.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?(z&&
+F.removeAttribute("disabled"),B.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,B.checked,F.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');g('<img src="'+b+'"'+n+(""!=m?' style="'+m+'"':"")+k+"/>")}var l=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");k(a)}),null,null,null,mxUtils.bind(this,function(a){t({message:mxResources.get("unknownError")})}),
null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+m+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?k("data:image/png;base64,"+n.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};
EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.graph.getSvg(),l=k.getElementsByTagName("a");if(null!=l)for(var m=0;m<l.length;m++){var n=l[m].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==l[m].getAttribute("target")&&l[m].removeAttribute("target")}d&&k.setAttribute("content",this.getFileData(!0));b&&this.editor.addSvgShadow(k);if(c){var p=" ",q="";d&&(p="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
@@ -7782,14 +7783,14 @@ GitHubClient.prototype.executeRequest=function(a,c,f){var d=mxUtils.bind(this,fu
function(){this.authenticate(function(){b(!0)},f)})}):this.authenticate(function(){d(!0)},f);else if(403===a.getStatus()){var l=!1;try{var n=JSON.parse(a.getText());null!=n&&null!=n.errors&&0<n.errors.length&&(l="too_large"==n.errors[0].code)}catch(p){}f({message:mxResources.get(l?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?f({message:mxResources.get("fileNotFound")}):409===a.getStatus()?f({status:409}):f({message:mxResources.get("error")+" "+a.getStatus()})}),f)}),b=mxUtils.bind(this,
function(a){null==this.user?this.updateUser(function(){b(!0)},f,a):d(a)});null==this.token?this.authenticate(function(){b(!0)},f):b(!1)};GitHubClient.prototype.getLibrary=function(a,c,f){this.getFile(a,c,f,!0)};
GitHubClient.prototype.getFile=function(a,c,f,d){d=null!=d?d:!1;var b=a.split("/"),e=b[0],g=b[1],k=b[2];a=b.slice(3,b.length).join("/");if(/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||/\.png$/i.test(a))if(null!=this.token){var l=this.baseUrl+"/repos/"+e+"/"+g+"/contents/"+a+"?ref="+encodeURIComponent(k)+"&token="+this.token,b=a.split("/");this.ui.convertFile(l,0<b.length?b[b.length-1]:a,null,this.extension,c,f)}else f({message:mxResources.get("accessDenied")});else a=new mxXmlRequest(this.baseUrl+"/repos/"+
-e+"/"+g+"/contents/"+a+"?ref="+encodeURIComponent(k),null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(e,g,k,JSON.parse(a.getText()),d))}catch(n){f(n)}}),f)};GitHubClient.prototype.createGitHubFile=function(a,c,f,d,b){a={org:a,repo:c,ref:f,name:d.name,path:d.path,sha:d.sha,html_url:d.html_url,download_url:d.download_url};c=d.content;"base64"===d.encoding&&(c=Base64.decode(c));return b?new GitHubLibrary(this.ui,c,a):new GitHubFile(this.ui,c,a)};
-GitHubClient.prototype.insertLibrary=function(a,c,f,d,b){this.insertFile(a,c,f,d,!0,b,!1)};
+e+"/"+g+"/contents/"+a+"?ref="+encodeURIComponent(k),null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(e,g,k,JSON.parse(a.getText()),d))}catch(n){f(n)}}),f)};
+GitHubClient.prototype.createGitHubFile=function(a,c,f,d,b){a={org:a,repo:c,ref:f,name:d.name,path:d.path,sha:d.sha,html_url:d.html_url,download_url:d.download_url};c=d.content;"base64"===d.encoding&&(c=/\.jpe?g$/i.test(d.name)?"data:image/jpeg;base64,"+c:/\.gif$/i.test(d.name)?"data:image/gif;base64,"+c:Base64.decode(c));return b?new GitHubLibrary(this.ui,c,a):new GitHubFile(this.ui,c,a)};GitHubClient.prototype.insertLibrary=function(a,c,f,d,b){this.insertFile(a,c,f,d,!0,b,!1)};
GitHubClient.prototype.insertFile=function(a,c,f,d,b,e,g){b=null!=b?b:!1;e=e.split("/");var k=e[0],l=e[1],m=e[2],n=e.slice(3,e.length).join("/");0<n.length&&(n+="/");n+=a;this.checkExists(k+"/"+l+"/"+m+"/"+n,!0,mxUtils.bind(this,function(e,q){e?b?(g||(c=Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(k,l,m,n,a,c,q,mxUtils.bind(this,function(a){try{var c=JSON.parse(a.getText());f(this.createGitHubFile(k,l,m,c.content,b))}catch(y){d(y)}}),d)}),d)):f(new GitHubFile(this.ui,
c,{org:k,repo:l,ref:m,name:a,path:n,sha:q,isNew:!0})):d()}))};GitHubClient.prototype.showCommitDialog=function(a,c,f,d){var b=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){b();f(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){d()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()};
GitHubClient.prototype.writeFile=function(a,c,f,d,b,e,g,k,l){e.length>=this.maxFileSize?l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 1 MB)"}):(b={path:d,message:b,content:e},null!=g&&(b.sha=g),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+d+"?ref="+encodeURIComponent(f),JSON.stringify(b),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){k(a)}),l))};
GitHubClient.prototype.checkExists=function(a,c,f){this.getFile(a,mxUtils.bind(this,function(d){if(c&&null!=d.meta){var b=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){b();f(!0,d.meta.sha)},function(){b();f(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){f(!1)})}),mxUtils.bind(this,function(a){f(!0)}))};
GitHubClient.prototype.saveFile=function(a,c,f){var d=a.meta.org,b=a.meta.repo,e=a.meta.ref,g=a.meta.path;this.showCommitDialog(a.meta.name,null==a.meta.sha||a.meta.isNew,mxUtils.bind(this,function(k){var l=Base64.encode(a.getData()),m=mxUtils.bind(this,function(n){this.writeFile(d,b,e,g,k,l,n,mxUtils.bind(this,function(b){delete a.meta.isNew;c(JSON.parse(b.getText()))}),mxUtils.bind(this,function(a){null!=a&&409==a.status?(resume=this.ui.spinner.pause(),a=new ErrorDialog(this.ui,mxResources.get("errorSavingFile"),
-mxResources.get("fileChangedOverwrite"),mxResources.get("cancel"),mxUtils.bind(this,function(){f()}),null,mxResources.get("overwrite"),mxUtils.bind(this,function(){resume();this.getFile(d+"/"+b+"/"+e+"/"+g,mxUtils.bind(this,function(a){m(a.meta.sha)}))})),this.ui.showDialog(a.container,340,150,!0,!1),a.init()):f(a)}))});m(a.meta.sha)}),mxUtils.bind(this,function(){f()}))};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};
+mxResources.get("fileChangedOverwrite"),mxResources.get("cancel"),mxUtils.bind(this,function(){f()}),null,mxResources.get("overwrite"),mxUtils.bind(this,function(){resume();this.getFile(d+"/"+b+"/"+e+"/"+g,mxUtils.bind(this,function(a){m(a.meta.sha)}),mxUtils.bind(this,function(){m(null)}))})),this.ui.showDialog(a.container,340,150,!0,!1),a.init()):f(a)}))});m(a.meta.sha)}),mxUtils.bind(this,function(){f()}))};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};
GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
GitHubClient.prototype.showGitHubDialog=function(a,c){var f=null,d=null,b=null,e=null,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.height="224px";var k=document.createElement("h3");mxUtils.write(k,mxResources.get(a?"selectFile":"selectFolder"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height="194px";
g.appendChild(l);var m=new CustomDialog(this.ui,g,mxUtils.bind(this,function(){c(f+"/"+d+"/"+b+"/"+e)}));this.ui.showDialog(m.container,340,270,!0,!0);a&&m.okButton.parentNode.removeChild(m.okButton);var n=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),p=mxUtils.bind(this,function(a){var c=document.createElement("div");c.style.marginBottom="8px";c.appendChild(n(f+"/"+d,mxUtils.bind(this,
@@ -7948,9 +7949,9 @@ App.prototype.showAuthDialog=function(a,c,f,d){var b=this.spinner.pause();this.s
App.prototype.convertFile=function(a,c,f,d,b,e){var g=c;/\.svg$/i.test(g)||(g=g.substring(0,c.lastIndexOf("."))+d);var k=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(k=!0);if(/\.vsdx$/i.test(c)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var l=new XMLHttpRequest;l.open("GET",a,!0);k||(l.responseType="blob");l.onload=mxUtils.bind(this,function(){var a=null;k?(a=JSON.parse(l.responseText),a=this.base64ToBlob(a.content,
"application/octet-stream")):a=new Blob([l.response],{type:"application/octet-stream"});this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(new LocalFile(this,a.responseText,g,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}),c)});l.send()}else{var m=mxUtils.bind(this,function(d){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(d),null!=temp?b(new LocalFile(this,temp,g,!0)):b(new LocalFile(this,d,c,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&
this.isRemoteFileFormat(d,a)?this.parseFile(new Blob([d],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(new LocalFile(this,a.responseText,g,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}),c):b(new LocalFile(this,d,g,!0))}catch(p){null!=e&&e(p)}});f=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=f&&"image/"==f.substring(0,6);k?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=
-b){a=JSON.parse(a.getText());var d=a.content;"base64"===a.encoding&&(d=/\.png$/i.test(c)?"data:image/png;base64,"+d:/\.jpe?g$/i.test(c)?"data:image/jpeg;base64,"+d:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(d):atob(d));m(d)}}else null!=e&&e({code:App.ERROR_UNKNOWN})}),function(){null!=e&&e({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=e&&e({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,m,e,f)}};
-App.prototype.loadUrl=function(a,c,f,d,b){try{var e=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a);b=null!=b?b:!0;var g=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var b=a.getText();if(e){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var b=Array(a.length),d=0;d<a.length;d++)b[d]=String.fromCharCode(a[d]);
-b=b.join("")}b="data:image/png;base64,"+this.base64Encode(b)}c(b)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!=f&&f({code:App.ERROR_UNKNOWN})},e,this.timeout,function(){b&&null!=f&&f({code:App.ERROR_TIMEOUT,retry:g})})});g()}catch(k){null!=f&&f(k)}};
+b){a=JSON.parse(a.getText());var d=a.content;"base64"===a.encoding&&(d=/\.png$/i.test(c)?"data:image/png;base64,"+d:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(d):atob(d));m(d)}}else null!=e&&e({code:App.ERROR_UNKNOWN})}),function(){null!=e&&e({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=e&&e({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,m,e,f)}};
+App.prototype.loadUrl=function(a,c,f,d,b){try{var e=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);b=null!=b?b:!0;var g=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var b=a.getText();if(e){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var b=Array(a.length),d=0;d<
+a.length;d++)b[d]=String.fromCharCode(a[d]);b=b.join("")}b="data:image/png;base64,"+this.base64Encode(b)}c(b)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!=f&&f({code:App.ERROR_UNKNOWN})},e,this.timeout,function(){b&&null!=f&&f({code:App.ERROR_TIMEOUT,retry:g})})});g()}catch(k){null!=f&&f(k)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="40px";this.appIcon.style.backgroundColor="#f18808";this.appIcon.style.height=this.menubarHeight+"px";mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX?
this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":a==App.MODE_ONEDRIVE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)":a==App.MODE_GITHUB&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=a}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);this.fnameWrapper=document.createElement("div");
@@ -8022,50 +8023,51 @@ mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spi
function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});l.setToggleAction(!0);l.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){d.isEditing()&&d.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");
e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""))},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),
b):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(b.addItem(mxResources.get("formatPng")+"...",null,mxUtils.bind(this,function(){a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportImage(a/100,b,c,d,e,g,!k,l)}),!0)}),c),a.jpgSupported&&b.addItem(mxResources.get("formatJpg")+"...",null,mxUtils.bind(this,
-function(){a.showExportJpgDialog("https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportImage(a/100,!1,b,c,!1,d,!e,!1,"jpeg")}),!0)}),c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.addItem(mxResources.get("image")+"...",null,mxUtils.bind(this,function(){a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,b){this.editorUi.downloadFile(b?"xmlpng":"png",null,null,a)}))}),
-c);b.addItem(mxResources.get("formatSvg")+"...",null,mxUtils.bind(this,function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportSvg(a/100,b,c,d,e,f,g,!k,l)}),!0)}),c);b.addSeparator(c);mxClient.IS_CHROMEAPP?b.addItem(mxResources.get("formatPdf")+"...",null,this.editorUi.actions.get("exportPdf").funct,c):a.isOffline()||mxClient.IS_IOS&&
-navigator.standalone||b.addItem(mxResources.get("formatPdf")+"...",null,mxUtils.bind(this,function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible);f.style.marginBottom=
-"16px";b=new CustomDialog(a,b,mxUtils.bind(this,function(){this.editorUi.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));this.editorUi.showDialog(b.container,300,146,!0,!0)}),c);b.addItem(mxResources.get("formatHtmlEmbedded")+"...",null,mxUtils.bind(this,function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,
-k,l,m,n){a.createHtml(b,c,d,e,f,g,k,l,m,n,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}),c);b.addSeparator(c);b.addItem(mxResources.get("formatXml")+"...",null,mxUtils.bind(this,function(){var b=document.createElement("div");
-b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get(c?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):
-g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));this.editorUi.showDialog(b.container,300,146,!0,!0)}),c);/.*\.draw\.io$/.test(window.location.hostname)&&b.addItem(mxResources.get("url")+"...",null,mxUtils.bind(this,function(){a.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,
-!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}),c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,c){function f(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,
-"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=
-e;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function l(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=n(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");m(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var m=mxUtils.bind(this,
-function(b,c,e){var f=d.view,g=d.getGraphBounds(),k=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),l=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"image/"==c.substring(0,6)?a.loadImage(b,mxUtils.bind(this,function(f){a.resizeImage(f,b,mxUtils.bind(this,function(f,g,m){f=Math.min(1,Math.min(a.maxImageSize/g,a.maxImageSize/m));a.importFile(b,c,k,l,Math.round(g*f),Math.round(m*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),
-!0)}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,k,l,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),n=mxUtils.bind(this,function(a){var b="text/xml";/(\.png)$/i.test(a)?b="image/png":/(\.jpe?g)$/i.test(a)&&(b="image/jpg");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){l(a.drive)},
-c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){l(a.gitHub)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){l(a.dropbox)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){l(a.oneDrive)},c):
-k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){f(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){f(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&
-a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){m(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c));b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c)})).isEnabled=b;this.put("theme",new Menu(mxUtils.bind(this,
-function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,
-function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),
-b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=b;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=
-c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,
-function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(a.getEditBlankXml(),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=
-App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){window.open("http://www.draw.io/app")}));a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+
-"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||
-this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),
-b)})));var q="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),u=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)};a.actions.addAction("insertText",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=
-d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html=1;resizable=0;autosize=1;align=left;verticalAlign=top;spacingTop=-4;points=[];");a.vertex=!0;d.startEditingAtCell(d.addCell(a))}},null,null,"Ctrl+Shift+X").isEnabled=b;a.actions.addAction("insertRectangle",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,
-a.y,120,60),"whiteSpace=wrap;html=1;");a.vertex=!0;d.setSelectionCell(d.addCell(a));d.scrollCellToVisible(d.getSelectionCell())}},null,null,"Ctrl+K").isEnabled=b;a.actions.addAction("insertEllipse",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace=wrap;html=1;");a.vertex=!0;d.setSelectionCell(d.addCell(a));d.scrollCellToVisible(d.getSelectionCell())}},
-null,null,"Ctrl+Shift+K").isEnabled=b;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<q.length;c++)"-"==q[c]?a.addSeparator(b):u(a,b,mxResources.get(q[c])+"...",q[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&
-(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+
-"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);
-isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?
-"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,
-null,null,null,App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,
-c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},
-c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||
-b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,
-c.getText(),b))}catch(z){a.handleError(z,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367-how-to-use-the-scratchpad-")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),
-c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addSubmenu("insert",b,c);b.addSeparator(c);this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,
-"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875-how-to-use-mathematical-typesetting-")}this.addMenuItems(b,["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed?b.addSeparator(c):(this.addMenuItems(b,["plugins","-"],c),d=this.addMenuItem(b,"tags",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,
-"https://desk.draw.io/support/solutions/articles/16000046966-how-to-use-tags"),this.addMenuItems(b,["-","offline"],c));a.isOffline()||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["chromeApp"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",
-b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],
-c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",
-b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,f){this.ui=a;this.page=c;this.previous=f}
+function(){a.showExportJpgDialog("https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportImage(a/100,!1,b,c,!1,d,!e,!1,"jpeg")}),!0)}),c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||(b.addItem(mxResources.get("formatPng")+"...",null,mxUtils.bind(this,function(){a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,b){this.editorUi.downloadFile(b?"xmlpng":"png",null,null,a)}))}),
+c),b.addItem(mxResources.get("formatJpg")+"...",null,mxUtils.bind(this,function(){a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,b){this.editorUi.downloadFile("jpeg",null,null,a)}),!0)}),c));b.addItem(mxResources.get("formatSvg")+"...",null,mxUtils.bind(this,function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){a=parseInt(a);!isNaN(a)&&
+0<a&&this.editorUi.exportSvg(a/100,b,c,d,e,f,g,!k,l)}),!0)}),c);b.addSeparator(c);mxClient.IS_CHROMEAPP?b.addItem(mxResources.get("formatPdf")+"...",null,this.editorUi.actions.get("exportPdf").funct,c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.addItem(mxResources.get("formatPdf")+"...",null,mxUtils.bind(this,function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport||mxEvent.addListener(e,"change",function(){e.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){this.editorUi.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));
+this.editorUi.showDialog(b.container,300,146,!0,!0)}),c);b.addItem(mxResources.get("formatHtmlEmbedded")+"...",null,mxUtils.bind(this,function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,k,l,m,n){a.createHtml(b,c,d,e,f,g,k,l,m,n,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+
+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}),c);b.addSeparator(c);b.addItem(mxResources.get("formatXml")+"...",null,mxUtils.bind(this,function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get(c?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));this.editorUi.showDialog(b.container,
+300,146,!0,!0)}),c);/.*\.draw\.io$/.test(window.location.hostname)&&b.addItem(mxResources.get("url")+"...",null,mxUtils.bind(this,function(){a.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}),c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",
+mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,c){function f(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});
+window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function l(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=n(b.getTitle());/\.svg$/i.test(b.getTitle())&&
+!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");m(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var m=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(),k=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),l=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,
+function(f){a.resizeImage(f,b,mxUtils.bind(this,function(f,g,m){f=Math.min(1,Math.min(a.maxImageSize/g,a.maxImageSize/m));a.importFile(b,c,k,l,Math.round(g*f),Math.round(m*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),!0)}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,k,l,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),
+n=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){l(a.drive)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){l(a.gitHub)},
+c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){l(a.dropbox)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){l(a.oneDrive)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
+"...",null,function(){f(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){f(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){m(a,c,b)},function(){a.spinner.stop();
+a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c));b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c)})).isEnabled=b;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);
+d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=
+a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));
+return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=b;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?
+a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),
+mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(a.getEditBlankXml(),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));
+this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){window.open("http://www.draw.io/app")}));a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();
+null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);
+this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),b)})));var q="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),u=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==
+e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)};a.actions.addAction("insertText",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html=1;resizable=0;autosize=1;align=left;verticalAlign=top;spacingTop=-4;points=[];");
+a.vertex=!0;d.startEditingAtCell(d.addCell(a))}},null,null,"Ctrl+Shift+X").isEnabled=b;a.actions.addAction("insertRectangle",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace=wrap;html=1;");a.vertex=!0;d.setSelectionCell(d.addCell(a));d.scrollCellToVisible(d.getSelectionCell())}},null,null,"Ctrl+K").isEnabled=b;a.actions.addAction("insertEllipse",function(){if(d.isEnabled()&&
+!d.isCellLocked(d.getDefaultParent())){var a=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace=wrap;html=1;");a.vertex=!0;d.setSelectionCell(d.addCell(a));d.scrollCellToVisible(d.getSelectionCell())}},null,null,"Ctrl+Shift+K").isEnabled=b;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=
+0;c<q.length;c++)"-"==q[c]?a.addSeparator(b):u(a,b,mxResources.get(q[c])+"...",q[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,
+c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},
+c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",
+new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+
+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&
+a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(z){a.handleError(z,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},
+mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers",
+"-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367-how-to-use-the-scratchpad-")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,
+"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addSubmenu("insert",b,c);b.addSeparator(c);this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875-how-to-use-mathematical-typesetting-")}this.addMenuItems(b,
+["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed?b.addSeparator(c):(this.addMenuItems(b,["plugins","-"],c),d=this.addMenuItem(b,"tags",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000046966-how-to-use-tags"),this.addMenuItems(b,["-","offline"],c));a.isOffline()||navigator.standalone||"1"==urlParams.embed||
+this.addMenuItems(b,["chromeApp"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],
+c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename",
+"makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",
+b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,f){this.ui=a;this.page=c;this.previous=f}
RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,c,f){this.ui=a;this.oldIndex=c;this.newIndex=f}
MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(a,c){this.ui=a;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c))}
SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,c=this.ui.editor,f=c.graph,d=c.graph.compress(f.zapGremlins(mxUtils.getXml(c.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=f.getViewState();a.root=f.model.root;f.view.clear(a.root,!0);f.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;f.model.rootChanged(a.root);f.setViewState(a.viewState);
diff --git a/war/js/atlas-viewer.min.js b/war/js/atlas-viewer.min.js
index 938a0f3c..4466e3a9 100644
--- a/war/js/atlas-viewer.min.js
+++ b/war/js/atlas-viewer.min.js
@@ -2608,14 +2608,14 @@ 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 r=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 r.apply(this,arguments)}})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
-EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.enableLogging=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!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(p){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c=a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=
-null!==c.match("image/jpeg")}catch(n){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=
-function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),b=0;b<a.length;b++)"picker modal-dialog picker-dialog"==a[b].className&&(a[b].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return mxClient.IS_FF&&this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
-function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),e=d.spin;d.spin=function(c,f){var k=!1;this.active||(e.call(this,c),this.active=!0,null!=f&&(k=document.createElement("div"),k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize="9pt",k.style.padding="6px",
-k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,a)+"px",k.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),k.innerHTML=f+"...",c.appendChild(k),d.status=k,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(k.style.left=Math.round(Math.max(0,a-k.offsetWidth/
-2))+"px",k.style.top=Math.round(Math.max(0,b+70-k.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,f)}));this.stop();return a}),k=!0);return k};var f=d.stop;d.stop=function(){f.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=f;f+=b;return a.substring(c,f)}function e(a){a=d(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var f=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=e(a);var k=d(a,4);if(null!=b&&b(f-8,k,c))break;value=d(a,c);d(a,4);if("IEND"==k)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(n){}return!1};
+EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.enableLogging=!0;EditorUi.prototype.pdfPageExport=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!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(p){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c=
+a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(n){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};
+EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),b=0;b<a.length;b++)"picker modal-dialog picker-dialog"==a[b].className&&(a[b].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return mxClient.IS_FF&&this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};
+EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),e=d.spin;d.spin=function(c,f){var k=!1;this.active||(e.call(this,c),this.active=!0,null!=f&&(k=document.createElement("div"),k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize=
+"9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,a)+"px",k.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),k.innerHTML=f+"...",c.appendChild(k),d.status=k,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(k.style.left=Math.round(Math.max(0,
+a-k.offsetWidth/2))+"px",k.style.top=Math.round(Math.max(0,b+70-k.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,f)}));this.stop();return a}),k=!0);return k};var f=d.stop;d.stop=function(){f.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=f;f+=b;return a.substring(c,f)}function e(a){a=d(a,
+4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var f=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=e(a);var k=d(a,4);if(null!=b&&b(f-8,k,c))break;value=d(a,c);d(a,4);if("IEND"==k)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(n){}return!1};
var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("&lt;mxfile ");if(0<=d){var e=b.lastIndexOf("&lt;/mxfile&gt;");e>d&&(c=b.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),k=this.editor.extractGraphModel(f.documentElement,null!=this.pages),c=null!=k?mxUtils.getXml(k):""}catch(r){}return c};EditorUi.prototype.validateFileData=
function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+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")),
@@ -2634,87 +2634,87 @@ e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![end
!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&&null!=
b&&(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.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||
/(\.svg)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var k=this.getBaseFilename(),g=k+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(g,a,l,"text/xml")}else if("html"==a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,k),this.saveData(g,a,l,"text/html");
-else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a&&(g=k+".png"),this.saveRequest(g,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var k=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return k}catch(y){this.handleError(y)}}));else{var m=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var p=this.editor.graph.background;p==mxConstants.NONE&&(p=null);var q=this.editor.graph.getSvg(p,null,null,null,null,d);c&&this.editor.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=
-k+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),d)}}catch(x){this.handleError(x)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=0;k<this.pages.length;k++)if(this.pages[k]==
-this.currentPage){f="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+d+"&embedXml="+e+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();
-var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);null!=c&&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{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);
-a.addListener("contentChanged",this.descriptorChangedListener);this.descriptorChanged();a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus(mxResources.get("readOnly")));this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus());
-this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;if(this.enableLogging&&!this.isOffline())try{var e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e.src=f+"/log?msg=storageMode:"+encodeURIComponent(a.getMode())+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(r){}if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(r){}}catch(r){null!=
-window.console&&console.log("error in fileLoaded:",a,r);if(this.enableLogging&&!this.isOffline())try{e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"",e.src=f+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=r&&null!=r.message?":err:"+encodeURIComponent(r.message):"")+(null!=r&&null!=r.stack?"&stack="+encodeURIComponent(r.stack):"")}catch(t){}this.handleError(r,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!=c?this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,f,g){};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.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],k=f.data;if(null!=k){var k=this.convertDataUri(k),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
-"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+k,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(k=this.stringToCells(this.editor.graph.decompress(f.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;
-c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");g.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("align",
-"top");m.setAttribute("border","0");m.className="geButton";m.style.marginRight="1px";m.style.marginTop="-1px";l.appendChild(m);var v=null;mxEvent.addListener(m,"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(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==k?k.setAttribute("title",mxResources.get("libraryTooltip")):
-k.removeAttribute("title")}));if(a.isEditable()){var z=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),x=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=m.cloneNode(!1),E.setAttribute("src",Editor.spinImage),E.setAttribute("title",mxResources.get("saving")),E.style.cursor="default",E.style.marginRight="2px",E.style.marginTop="-2px",l.insertBefore(E,
-l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),g.style.paddingRight=18*l.childNodes.length+"px")})):null==v&&(v=m.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",mxResources.get("save")),l.insertBefore(v,l.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==
-LocalLibrary,!0);v.parentNode.removeChild(v);v=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,f){a=z.cloneCells(z.model.getTopmostCells(a));for(var g=0;g<a.length;g++){var l=z.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.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)}),G=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)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,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)":k.style.border="3px dotted rgb(254, 137, 12)",k.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&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=!0,G(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&
-null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.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(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";
-a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.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,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
-this.convertDataUri(c),q=[new mxCell("",new mxGeometry(0,0,m,n),q)];q[0].vertex=!0;C(q,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var r=JSON.parse(mxUtils.getTextContent(c.documentElement));f(r,k);b=b.concat(r);x(a);this.spinner.stop();p=!0}catch(D){}else if("mxfile"==c.documentElement.nodeName)try{r=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),
-q=this.stringToCells(this.editor.graph.decompress(r)),C(q,new mxRectangle(0,0,m,n),a),p=!0}catch(D){}p||(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(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));
-m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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)})),l.insertBefore(c,l.firstChild));var E=null;mxEvent.addListener(m,"click",G)}g.appendChild(l);g.style.paddingRight=18*l.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"),k=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(f=mxResources.get("cancel"),k=function(){d();e.retry()}),"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 g=window.location.hash;null!=g&&"#G"==g.substring(0,2)&&(g=g.substring(2),a+=' <a href="https://drive.google.com/open?id='+g+'" target="_blank">'+mxResources.get("tryOpeningViaThisPage")+"</a>")}else e.code==App.ERROR_TIMEOUT?a=mxResources.get("timeout"):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,k)}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.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
-return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename,e=d.lastIndexOf(".");0<e&&(d=d.substring(0,e));e="jpeg"==c?"jpg":c;d+="."+e;a=this.createImageDataUri(a,b,c);this.saveData(d,e,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&
-8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(c),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=
-new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var f=document.createElement("a");if("undefined"!==typeof f.download||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));"undefined"!==typeof f.download?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);
-try{f.click(),window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.parentNode.removeChild(f)}catch(r){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=
-b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),g=0;g<e;++g){for(var k=1024*g,l=Math.min(k+1024,d),A=Array(l-k),v=0;k<l;++v,++k)A[v]=c[k].charCodeAt(0);f[g]=new Uint8Array(A)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e){e=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG)f=window.open("about:blank"),
-null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());else if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('<html><img src="data:'+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),f.document.close())}else f=window.open("data:"+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else e==App.MODE_DEVICE?
-this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(u){this.handleError(u)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e,null,null,4);this.showDialog(b.container,380,5>this.getServiceCount(!1)-1?270:390,!0,!0);b.init()};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,
-function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}))};EditorUi.prototype.saveRequest=function(a,b,c){var d=!mxClient.IS_IOS||!navigator.standalone;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var e=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||"_blank"==d?"0":"1");null!=e&&(d==App.MODE_DEVICE||"_blank"==d?e.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){this.spinner.spin(document.body,mxResources.get("saving"))&&
-e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),a,f,!0,d,c)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,d,null,null,4);this.showDialog(a.container,380,
-5>this.getServiceCount(!1)-1?270:390,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,g,t,u){if(this.spinner.spin(document.body,mxResources.get("export"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;k=b?null:this.editor.graph.background;k==mxConstants.NONE&&(k=null);null==k&&0==b&&(k="#ffffff");var l=this.editor.graph.getSvg(k,a,g,t,null,c);d&&this.editor.addSvgShadow(l);
-a=this.getCurrentFile();var m=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=m.lastIndexOf(".");0<a&&(m=m.substring(0,a));var m=m+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,u));var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,l,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,n,this.thumbImageCache)):n(l)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e){var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled",
-"disabled");a.appendChild(f);mxUtils.write(a,b);e||mxUtils.br(a);return f};EditorUi.prototype.addLinkSection=function(a,b){function c(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");
-d.style.width="100px";d.style.marginLeft="4px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&
-(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();g.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width=
-"22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,t){var k=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),
-e&&l.push("edit=_blank"),f&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&l.push("page="+a);break}a=!0;null!=g?c="#U"+encodeURIComponent(g):(k=this.getCurrentFile(),t||null==k||k.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
-(c="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,t,u,A,v){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=e);"auto"!==d&&(l.target=d);u||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||
-100==c||(l.zoom=c/100);c=[];g&&(c.push("pages"),l.resize=!0,null!=this.pages&&null!=this.currentPage&&(l.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),l.resize=!0);t&&c.push("layers");0<c.length&&(u&&c.push("lightbox"),l.toolbar=c.join(" "));A&&(l.edit=null!=a?a:"_blank");null!=a?l.url=a:l.xml=this.getFileData(!0,null,null,null,null,!g);b='<div class="mxgraph" style="'+(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(l))+
-'"></div>';k=0<k.length?"s="+k.join(";"):"";a=null!=a?"fetch="+encodeURIComponent(a):"";v(b,'<script type="text/javascript" src="'+(0<k.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1&"+k:"https://www.draw.io/embed2.js?"+k)+"&"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");
-mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value",
-"copy");g.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(l=document.createElement("a"),l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),
-g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),z=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var B=document.createElement("input");B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight=
-"12px";B.value="100%";e.appendChild(B);var x=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(e,mxResources.get("allPages"),g,!g),G=this.addCheckbox(e,mxResources.get("layers"),!0),E=this.addCheckbox(e,mxResources.get("lightbox"),!0),y=this.addCheckbox(e,mxResources.get("showEditButton"),!0);y.style.marginLeft="24px";y.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?y.removeAttribute("disabled"):y.setAttribute("disabled",
-"disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,z.checked,B.value,n.getTarget(),n.getColor(),x.checked,C.checked,G.checked,E.checked,y.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
-g.appendChild(k);var l=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941-how-to-publicly-publish-a-copy-of-your-draw-io-diagram";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384-how-to-publicly-publish-a-copy-of-your-draw-io-diagram-stored-in-google-drive",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);g.appendChild(m);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));
-m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var p=null,q=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),p=document.createElement("input"),
-p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",g.appendChild(p),mxUtils.write(g,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=d+"px",g.appendChild(q),mxUtils.br(g);var x=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var C=null;
-if(null==l||l.constructor!=window.DriveFile||b)C=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var G=this.addCheckbox(g,mxResources.get("lightbox"),!0),E=this.addCheckbox(g,mxResources.get("showEditButton"),!0);E.style.marginLeft="24px";var y=this.addCheckbox(g,mxResources.get("layers"),!0);y.style.marginLeft=E.style.marginLeft;y.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?(y.removeAttribute("disabled"),E.removeAttribute("disabled")):(y.setAttribute("disabled",
-"disabled"),E.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(x.getTarget(),x.getColor(),null==C?!0:C.checked,G.checked,E.checked,y.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):x.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,
-b,c){var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0);g.style.marginBottom="16px";a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!f.checked,
-g.checked)}),null,a,b);this.showDialog(a.container,300,146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=this.editor.graph,l=280,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(m);mxUtils.write(g,mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";
-n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";g.appendChild(n);mxUtils.write(g,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value="0";g.appendChild(p);mxUtils.br(g);var q=this.addCheckbox(g,mxResources.get("transparentBackground"),k.background==mxConstants.NONE||null==k.background),x=this.addCheckbox(g,mxResources.get("selectionOnly"),
-!1,k.isSelectionEmpty()),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");f&&(g.appendChild(C),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),l+=26);k.isSelectionEmpty()?C.setAttribute("disabled","disabled"):(C.setAttribute("checked","checked"),C.defaultChecked=!0);var G=this.addCheckbox(g,mxResources.get("shadow"),k.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type",
-"checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(g.appendChild(E),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),l+=26);var y=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0);a=null!=this.pages&&1<this.pages.length;var H=H=this.addCheckbox(g,mxResources.get("allPages"),a,!a);H.style.marginLeft="24px";H.style.marginBottom="16px";mxEvent.addListener(y,"change",function(){y.checked?H.removeAttribute("disabled"):H.setAttribute("disabled",
-"disabled")});c=new CustomDialog(this,g,mxUtils.bind(this,function(){e(n.value,q.checked,!x.checked,G.checked,y.checked,E.checked,p.value,C.checked,!H.checked)}),null,c,d);this.showDialog(c.container,320,l,!0,!0);n.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showExportJpgDialog=function(a,b){var c=document.createElement("div");c.style.whiteSpace="nowrap";var d=this.editor.graph,e=document.createElement("h3");
-mxUtils.write(e,mxResources.get("formatJpg"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(e);mxUtils.write(c,mxResources.get("zoom")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginRight="16px";f.style.width="60px";f.style.marginLeft="4px";f.style.marginBottom="4px";f.value="100%";c.appendChild(f);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type",
-"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=document.createElement("input");l.style.marginTop="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");c.appendChild(l);mxUtils.write(c,mxResources.get("crop"));mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=
-!0);var A=this.addCheckbox(c,mxResources.get("shadow"),d.shadowVisible),d=document.createElement("input");d.style.marginTop="16px";d.style.marginRight="8px";d.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||d.setAttribute("disabled","disabled");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,!k.checked,A.checked,g.value,l.checked)}),null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||
-mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(k)}var l=this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,
-!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addCheckbox(f,mxResources.get("showEditButton"),!0);B.style.marginLeft="24px";var x=1<g.model.getChildCount(g.model.getRoot()),C=this.addCheckbox(f,mxResources.get("layers"),x,!x);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?(x&&C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled",
-"disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,B.checked,C.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=k+".png":"jpeg"==a&&(g=k+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var k=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return k}catch(y){this.handleError(y)}}));else{var m=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):
+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var p=this.editor.graph.background;p==mxConstants.NONE&&(p=null);var q=this.editor.graph.getSvg(p,null,null,null,null,d);c&&this.editor.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a))})))}else g=k+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),d)}}catch(x){this.handleError(x)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=
+0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){f="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+d+"&embedXml="+e+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();
+this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);null!=c&&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{this.setCurrentFile(a);a.addListener("descriptorChanged",
+this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);this.descriptorChanged();a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus(mxResources.get("readOnly")));this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==
+window.top&&window.focus());this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;if(this.enableLogging&&!this.isOffline()&&null!=a.getMode())try{var e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e.src=f+"/log?msg=storageMode:"+encodeURIComponent(a.getMode())+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(r){}if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),
+mode:a.getMode()})}catch(r){}}catch(r){null!=window.console&&console.log("error in fileLoaded:",a,r);if(this.enableLogging&&!this.isOffline())try{e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"",e.src=f+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=r&&null!=r.message?":err:"+encodeURIComponent(r.message):"")+(null!=r&&null!=r.stack?"&stack="+encodeURIComponent(r.stack):"")}catch(t){}this.handleError(r,
+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!=c?this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,f,g){};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.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],k=f.data;if(null!=k){var k=this.convertDataUri(k),
+g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+k,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(k=this.stringToCells(this.editor.graph.decompress(f.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,
+a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");g.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",
+mxResources.get("close"));m.setAttribute("align","top");m.setAttribute("border","0");m.className="geButton";m.style.marginRight="1px";m.style.marginTop="-1px";l.appendChild(m);var v=null;mxEvent.addListener(m,"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(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==
+k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var z=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),x=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=m.cloneNode(!1),E.setAttribute("src",Editor.spinImage),E.setAttribute("title",mxResources.get("saving")),E.style.cursor="default",
+E.style.marginRight="2px",E.style.marginTop="-2px",l.insertBefore(E,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),g.style.paddingRight=18*l.childNodes.length+"px")})):null==v&&(v=m.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",mxResources.get("save")),l.insertBefore(v,l.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,
+function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);v.parentNode.removeChild(v);v=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,f){a=z.cloneCells(z.model.getTopmostCells(a));for(var g=0;g<a.length;g++){var l=z.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.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)}),G=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)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,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)":k.style.border="3px dotted rgb(254, 137, 12)",k.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&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=
+!0,G(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.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(k,
+"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.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,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),q=[new mxCell("",new mxGeometry(0,0,m,n),q)];q[0].vertex=!0;C(q,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var r=JSON.parse(mxUtils.getTextContent(c.documentElement));
+f(r,k);b=b.concat(r);x(a);this.spinner.stop();p=!0}catch(D){}else if("mxfile"==c.documentElement.nodeName)try{r=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),q=this.stringToCells(this.editor.graph.decompress(r)),C(q,new mxRectangle(0,0,m,n),a),p=!0}catch(D){}p||(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(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);
+m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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)})),l.insertBefore(c,l.firstChild));var E=null;mxEvent.addListener(m,
+"click",G)}g.appendChild(l);g.style.paddingRight=18*l.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"),k=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&
+(f=mxResources.get("cancel"),k=function(){d();e.retry()}),"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 g=window.location.hash;null!=g&&"#G"==
+g.substring(0,2)&&(g=g.substring(2),a+=' <a href="https://drive.google.com/open?id='+g+'" target="_blank">'+mxResources.get("tryOpeningViaThisPage")+"</a>")}else e.code==App.ERROR_TIMEOUT?a=mxResources.get("timeout"):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,k)}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.createImageDataUri=
+function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename,e=d.lastIndexOf(".");0<e&&(d=d.substring(0,e));e="jpeg"==c?"jpg":c;d+="."+e;a=this.createImageDataUri(a,b,c);this.saveData(d,
+e,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(c),
+navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var f=document.createElement("a");if("undefined"!==
+typeof f.download||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));"undefined"!==typeof f.download?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{f.click(),window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.parentNode.removeChild(f)}catch(r){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,
+a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),g=0;g<e;++g){for(var k=1024*g,l=Math.min(k+1024,d),A=Array(l-k),v=0;k<l;++v,++k)A[v]=c[k].charCodeAt(0);f[g]=new Uint8Array(A)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e){e=!mxClient.IS_IOS||!navigator.standalone;
+b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG)f=window.open("about:blank"),null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());else if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('<html><img src="data:'+c+(d?";base64,"+a:";charset=utf8,"+
+encodeURIComponent(a))+'"/></html>'),f.document.close())}else f=window.open("data:"+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(u){this.handleError(u)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e,null,null,4);this.showDialog(b.container,
+380,5>this.getServiceCount(!1)-1?270:390,!0,!0);b.init()};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}))};EditorUi.prototype.saveRequest=function(a,b,c){var d=!mxClient.IS_IOS||!navigator.standalone;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var e=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||
+"_blank"==d?"0":"1");null!=e&&(d==App.MODE_DEVICE||"_blank"==d?e.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),a,f,!0,d,c)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();
+this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,d,null,null,4);this.showDialog(a.container,380,5>this.getServiceCount(!1)-1?270:390,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,g,t,u){if(this.spinner.spin(document.body,mxResources.get("export"))){var k=this.editor.graph.isSelectionEmpty();
+c=null!=c?c:k;k=b?null:this.editor.graph.background;k==mxConstants.NONE&&(k=null);null==k&&0==b&&(k="#ffffff");var l=this.editor.graph.getSvg(k,a,g,t,null,c);d&&this.editor.addSvgShadow(l);a=this.getCurrentFile();var m=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=m.lastIndexOf(".");0<a&&(m=m.substring(0,a));var m=m+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,u));var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,l,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,n,this.thumbImageCache)):n(l)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e){var f=document.createElement("input");
+f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");a.appendChild(f);mxUtils.write(a,b);e||mxUtils.br(a);return f};EditorUi.prototype.addLinkSection=function(a,b){function c(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="4px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");
+e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();g.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width="22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,t){var k=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+
+a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),e&&l.push("edit=_blank"),f&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&l.push("page="+a);break}a=!0;null!=g?c="#U"+encodeURIComponent(g):(k=this.getCurrentFile(),t||null==k||k.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,
+null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,t,u,A,v){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=e);"auto"!==
+d&&(l.target=d);u||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(l.zoom=c/100);c=[];g&&(c.push("pages"),l.resize=!0,null!=this.pages&&null!=this.currentPage&&(l.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),l.resize=!0);t&&c.push("layers");0<c.length&&(u&&c.push("lightbox"),l.toolbar=c.join(" "));A&&(l.edit=null!=a?a:"_blank");null!=a?l.url=a:l.xml=this.getFileData(!0,null,null,null,null,!g);b='<div class="mxgraph" style="'+(f?"max-width:100%;":
+"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(l))+'"></div>';k=0<k.length?"s="+k.join(";"):"";a=null!=a?"fetch="+encodeURIComponent(a):"";v(b,'<script type="text/javascript" src="'+(0<k.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1&"+k:"https://www.draw.io/embed2.js?"+k)+"&"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=
+function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value",
+"url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(l=document.createElement("a"),
+l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),z=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var B=document.createElement("input");
+B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";e.appendChild(B);var x=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(e,mxResources.get("allPages"),g,!g),G=this.addCheckbox(e,mxResources.get("layers"),!0),E=this.addCheckbox(e,mxResources.get("lightbox"),!0),y=this.addCheckbox(e,mxResources.get("showEditButton"),!0);y.style.marginLeft="24px";y.style.marginBottom=
+"16px";mxEvent.addListener(E,"change",function(){E.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,z.checked,B.value,n.getTarget(),n.getColor(),x.checked,C.checked,G.checked,E.checked,y.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");
+mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var l=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941-how-to-publicly-publish-a-copy-of-your-draw-io-diagram";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384-how-to-publicly-publish-a-copy-of-your-draw-io-diagram-stored-in-google-drive",m=document.createElement("div");
+m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);g.appendChild(m);n=document.createElement("a");n.style.paddingLeft=
+"12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,
+300,80,!0,!1);a.init()}))}))}var p=null,q=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",g.appendChild(p),mxUtils.write(g,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom=
+"10px",q.value=d+"px",g.appendChild(q),mxUtils.br(g);var x=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var C=null;if(null==l||l.constructor!=window.DriveFile||b)C=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var G=this.addCheckbox(g,mxResources.get("lightbox"),!0),E=this.addCheckbox(g,mxResources.get("showEditButton"),!0);E.style.marginLeft="24px";var y=this.addCheckbox(g,mxResources.get("layers"),!0);y.style.marginLeft=E.style.marginLeft;y.style.marginBottom="16px";mxEvent.addListener(G,
+"change",function(){G.checked?(y.removeAttribute("disabled"),E.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(x.getTarget(),x.getColor(),null==C?!0:C.checked,G.checked,E.checked,y.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+p.select():document.execCommand("selectAll",!1,null)):x.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(f);var g=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),
+!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!g.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=this.editor.graph,l=280,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(m);mxUtils.write(g,
+mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";g.appendChild(n);mxUtils.write(g,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value="0";g.appendChild(p);mxUtils.br(g);var q=this.addCheckbox(g,mxResources.get("transparentBackground"),
+k.background==mxConstants.NONE||null==k.background),x=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");f&&(g.appendChild(C),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),l+=26);k.isSelectionEmpty()?C.setAttribute("disabled","disabled"):(C.setAttribute("checked","checked"),C.defaultChecked=!0);var G=this.addCheckbox(g,mxResources.get("shadow"),
+k.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(g.appendChild(E),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),l+=26);var y=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0);a=null!=this.pages&&1<this.pages.length;var H=H=this.addCheckbox(g,mxResources.get("allPages"),a,!a);H.style.marginLeft="24px";
+H.style.marginBottom="16px";mxEvent.addListener(y,"change",function(){y.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled")});c=new CustomDialog(this,g,mxUtils.bind(this,function(){e(n.value,q.checked,!x.checked,G.checked,y.checked,E.checked,p.value,C.checked,!H.checked)}),null,c,d);this.showDialog(c.container,320,l,!0,!0);n.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showExportJpgDialog=
+function(a,b){var c=document.createElement("div");c.style.whiteSpace="nowrap";var d=this.editor.graph,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatJpg"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(e);mxUtils.write(c,mxResources.get("zoom")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginRight="16px";f.style.width="60px";f.style.marginLeft="4px";f.style.marginBottom="4px";f.value="100%";
+c.appendChild(f);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=document.createElement("input");l.style.marginTop="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");c.appendChild(l);mxUtils.write(c,mxResources.get("crop"));
+mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=!0);var A=this.addCheckbox(c,mxResources.get("shadow"),d.shadowVisible),d=document.createElement("input");d.style.marginTop="16px";d.style.marginRight="8px";d.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||d.setAttribute("disabled","disabled");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,!k.checked,A.checked,g.value,l.checked)}),
+null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(k)}var l=
+this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addCheckbox(f,mxResources.get("showEditButton"),!0);B.style.marginLeft="24px";var x=1<g.model.getChildCount(g.model.getRoot()),C=this.addCheckbox(f,mxResources.get("layers"),x,!x);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?(x&&
+C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,B.checked,C.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');g('<img src="'+b+'"'+n+(""!=m?' style="'+m+'"':"")+k+"/>")}var l=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");k(a)}),null,null,null,mxUtils.bind(this,function(a){t({message:mxResources.get("unknownError")})}),
null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+m+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?k("data:image/png;base64,"+n.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};
EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.graph.getSvg(),l=k.getElementsByTagName("a");if(null!=l)for(var m=0;m<l.length;m++){var n=l[m].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==l[m].getAttribute("target")&&l[m].removeAttribute("target")}d&&k.setAttribute("content",this.getFileData(!0));b&&this.editor.addSvgShadow(k);if(c){var p=" ",q="";d&&(p="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
diff --git a/war/js/atlas.min.js b/war/js/atlas.min.js
index 684924ab..5e001d7a 100644
--- a/war/js/atlas.min.js
+++ b/war/js/atlas.min.js
@@ -44,14 +44,14 @@ function(){return null!==this.k};f.prototype.V=function(){return this.h&&decodeU
this.l};f.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="&",c&&a.push("=",encodeURIComponent(c.toString()));this.l=a.join("")};f.prototype.fa=function(b){this.o=b?b:null};f.prototype.Z=function(){return null!==this.o};
var m=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,n=/[#\/\?@]/g,p=/[\#\?]/g;f.parse=b;f.create=function(b,e,c,g,k,l,m){b=new f(a(b,n),a(e,n),"string"==typeof c?encodeURIComponent(c):null,0<g?g.toString():null,a(k,p),null,"string"==typeof m?encodeURIComponent(m):null);l&&("string"===typeof l?b.O(l.replace(/[^?&=0-9A-Za-z_\-~.%]/g,d)):b.ba(l));return b};f.N=c;f.ma=e;f.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 f}();"undefined"!==typeof window&&(window.URI=e);var g=void 0,k=void 0,l=void 0,m=void 0;(function(){function a(b){return"string"===typeof b?'url("'+b.replace(A,d)+'")':'url("about:blank")'}function d(b){return B[b]}function f(b,a){return b?e.ha.N(b,a):a}function p(b,a,d){if(!d)return null;var e=(""+b).match(z);return!e||e[1]&&!C.test(e[1])?null:d(b,a)}function x(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","<":"%3c",">":"%3e"},z=/^(?:([^:/?# ]+):)?/,C=/^(?:https?|mailto|data)$/i;g=function(){var d={};return function H(e,g,k,l,m){e=x(e);var n=c[e];if(n&&"object"===typeof n){for(var t=n.cssPropBits,u=t&80,q=t&1536,v=NaN,y=0,z=0;y<g.length;++y){var D=g[y].toLowerCase(),A=D.charCodeAt(0),B,C,E,F,J,I;if(32===A)D="";else if(34===A)D=16===u?k?a(p(f(l,b(g[y].substring(1,D.length-1))),e,k)):"":
-t&8&&!(u&u-1)?D:"";else if("inherit"!==D){if(J=n.cssLitGroup){var L;if(!(L=n.cssLitMap)){L={};for(var M=J.length;0<=--M;)for(var Y=J[M],U=Y.length;0<=--U;)L[Y[U]]=d;L=n.cssLitMap=L}J=L}else J=d;if(I=J,I[x(D)]!==d)if(35===A&&/^#(?:[0-9a-f]{3}){1,2}$/.test(D))D=t&2?D:"";else if(48<=A&&57>=A)D=t&1?D:"";else if(B=D.charCodeAt(1),C=D.charCodeAt(2),E=48<=B&&57>=B,F=48<=C&&57>=C,43===A&&(E||46===B&&F))D=t&1?(E?"":"0")+D.substring(1):"";else if(45===A&&(E||46===B&&F))D=t&4?(E?"-":"-0")+D.substring(1):t&1?
-"0":"";else if(46===A&&E)D=t&1?"0"+D:"";else if('url("'===D.substring(0,5))D=k&&t&16?a(p(f(l,g[y].substring(5,D.length-2)),e,k)):"";else if("("===D.charAt(D.length-1))a:{J=g;L=y;D=1;M=L+1;for(A=J.length;M<A&&D;)Y=J[M++],D+=")"===Y?-1:/^[^"']*\($/.test(Y);if(!D)for(D=J[L].toLowerCase(),A=x(D),J=J.splice(L,M-L,""),L=n.cssFns,M=0,Y=L.length;M<Y;++M)if(L[M].substring(0,A.length)==A){J[0]=J[J.length-1]="";H(L[M],J,k,l);D=D+J.join(" ")+")";break a}D=""}else D=q&&/^-?[a-z_][\w\-]*$/.test(D)&&!/__$/.test(D)?
-m&&512===q?g[y]+m:1024===q&&c[D]&&"number"===typeof c[D].oa?D:"":/^\w+$/.test(D)&&64===u&&t&8?v+1===z?(g[v]=g[v].substring(0,g[v].length-1)+" "+D+'"',""):(v=z,'"'+D+'"'):""}D&&(g[z++]=D)}1===z&&'url("about:blank")'===g[0]&&(z=0);g.length=z}else g.length=0}}();var F=/^(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)$/,
-E={};E[">"]=E["+"]=E["~"]=E;k=function(b,a,d){function e(e,l){function m(d,e,c){var k,l,m,p,t,u=!0;k="";d<e&&((t=b[d],"*"===t)?(++d,k=t):/^[a-zA-Z]/.test(t)&&(l=g(t.toLowerCase(),[]))&&("tagName"in l&&(t=l.tagName),++d,k=t));for(p=m=l="";u&&d<e;++d)if(t=b[d],"#"===t.charAt(0))/^#_|__$|[^\w#:\-]/.test(t)?u=!1:l+=t+f;else if("."===t)++d<e&&/^[0-9A-Za-z:_\-]+$/.test(t=b[d])&&!/^_|__$/.test(t)?l+="."+t:u=!1;else if(d+1<e&&"["===b[d]){++d;var v=b[d++].toLowerCase();t=q.m[k+"::"+v];t!==+t&&(t=q.m["*::"+
+"")}var A=/[\n\f\r\"\'()*<>]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},z=/^(?:([^:/?# ]+):)?/,C=/^(?:https?|mailto|data)$/i;g=function(){var d={};return function H(e,g,k,l,m){e=x(e);var n=c[e];if(n&&"object"===typeof n){for(var t=n.cssPropBits,u=t&80,q=t&1536,v=NaN,y=0,z=0;y<g.length;++y){var A=g[y].toLowerCase(),E=A.charCodeAt(0),B,C,D,F,J,I;if(32===E)A="";else if(34===E)A=16===u?k?a(p(f(l,b(g[y].substring(1,A.length-1))),e,k)):"":
+t&8&&!(u&u-1)?A:"";else if("inherit"!==A){if(J=n.cssLitGroup){var L;if(!(L=n.cssLitMap)){L={};for(var M=J.length;0<=--M;)for(var Y=J[M],U=Y.length;0<=--U;)L[Y[U]]=d;L=n.cssLitMap=L}J=L}else J=d;if(I=J,I[x(A)]!==d)if(35===E&&/^#(?:[0-9a-f]{3}){1,2}$/.test(A))A=t&2?A:"";else if(48<=E&&57>=E)A=t&1?A:"";else if(B=A.charCodeAt(1),C=A.charCodeAt(2),D=48<=B&&57>=B,F=48<=C&&57>=C,43===E&&(D||46===B&&F))A=t&1?(D?"":"0")+A.substring(1):"";else if(45===E&&(D||46===B&&F))A=t&4?(D?"-":"-0")+A.substring(1):t&1?
+"0":"";else if(46===E&&D)A=t&1?"0"+A:"";else if('url("'===A.substring(0,5))A=k&&t&16?a(p(f(l,g[y].substring(5,A.length-2)),e,k)):"";else if("("===A.charAt(A.length-1))a:{J=g;L=y;A=1;M=L+1;for(E=J.length;M<E&&A;)Y=J[M++],A+=")"===Y?-1:/^[^"']*\($/.test(Y);if(!A)for(A=J[L].toLowerCase(),E=x(A),J=J.splice(L,M-L,""),L=n.cssFns,M=0,Y=L.length;M<Y;++M)if(L[M].substring(0,E.length)==E){J[0]=J[J.length-1]="";H(L[M],J,k,l);A=A+J.join(" ")+")";break a}A=""}else A=q&&/^-?[a-z_][\w\-]*$/.test(A)&&!/__$/.test(A)?
+m&&512===q?g[y]+m:1024===q&&c[A]&&"number"===typeof c[A].oa?A:"":/^\w+$/.test(A)&&64===u&&t&8?v+1===z?(g[v]=g[v].substring(0,g[v].length-1)+" "+A+'"',""):(v=z,'"'+A+'"'):""}A&&(g[z++]=A)}1===z&&'url("about:blank")'===g[0]&&(z=0);g.length=z}else g.length=0}}();var F=/^(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)$/,
+D={};D[">"]=D["+"]=D["~"]=D;k=function(b,a,d){function e(e,l){function m(d,e,c){var k,l,m,p,t,u=!0;k="";d<e&&((t=b[d],"*"===t)?(++d,k=t):/^[a-zA-Z]/.test(t)&&(l=g(t.toLowerCase(),[]))&&("tagName"in l&&(t=l.tagName),++d,k=t));for(p=m=l="";u&&d<e;++d)if(t=b[d],"#"===t.charAt(0))/^#_|__$|[^\w#:\-]/.test(t)?u=!1:l+=t+f;else if("."===t)++d<e&&/^[0-9A-Za-z:_\-]+$/.test(t=b[d])&&!/^_|__$/.test(t)?l+="."+t:u=!1;else if(d+1<e&&"["===b[d]){++d;var v=b[d++].toLowerCase();t=q.m[k+"::"+v];t!==+t&&(t=q.m["*::"+
v]);var y;a.ia?(y=a.ia(k,v),"string"!==typeof y&&(u=!1,y=v),u&&t!==+t&&(t=q.d.NONE)):(y=v,t!==+t&&(u=!1));var x=v="",H=!1;/^[~^$*|]?=$/.test(b[d])&&(v=b[d++],x=b[d++],/^[0-9A-Za-z:_\-]+$/.test(x)?x='"'+x+'"':"]"===x&&(x='""',--d),/^"([^\"\\]|\\.)*"$/.test(x)||(u=!1),(H="i"===b[d])&&++d);"]"!==b[d]&&(++d,u=!1);switch(t){case q.d.CLASSES:case q.d.LOCAL_NAME:case q.d.NONE:break;case q.d.GLOBAL_NAME:case q.d.ID:case q.d.IDREF:"="!==v&&"~="!==v&&"$="!==v||'""'==x||H?"|="===v||""===v||(u=!1):x='"'+x.substring(1,
-x.length-1)+f+'"';break;case q.d.URI:case q.d.URI_FRAGMENT:""!==v&&(u=!1);break;default:u=!1}u&&(m+="["+y.replace(/[^\w-]/g,"\\$&")+v+x+(H?" i]":"]"))}else if(d<e&&":"===b[d])if(t=b[++d],F.test(t))p+=":"+t;else break;else break;d!==e&&(u=!1);u&&(d=(k+l).replace(/[^ .*#\w-]/g,"\\$&")+m+p+c)&&n.push(d);return u}" "===b[e]&&++e;l-1!==e&&" "===b[l]&&--l;for(var n=[],p=e,t=!0,u=e;t&&u<l;++u){var v=b[u];if(E[v]===E||" "===v)m(p,u,v)?p=u+1:t=!1}m(p,l,"")||(t=!1);return t?(n.length&&(p=n.join(""),null!==
-c&&(p="."+c+" "+p),k.push(p)),!0):!d||d(b.slice(e,l))}var c=a.na,f=a.L,g=a.Aa,k=[],l=0,m,n=0,p;for(m=0;m<b.length;++m)(p=b[m],"("==p||"["==p?(++n,0):")"==p||"]"==p?(n&&--n,0):" "==b[m]&&(n||E[b[m-1]]===E||E[b[m+1]]===E))||(b[l++]=b[m]);b.length=l;l=b.length;for(m=n=0;m<l;++m)if(","===b[m]){if(!e(n,m))return null;n=m+1}return e(n,l)?k:null};(function(){var b=/^\w/,a=/^(?:(?:(?:(?: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;
+x.length-1)+f+'"';break;case q.d.URI:case q.d.URI_FRAGMENT:""!==v&&(u=!1);break;default:u=!1}u&&(m+="["+y.replace(/[^\w-]/g,"\\$&")+v+x+(H?" i]":"]"))}else if(d<e&&":"===b[d])if(t=b[++d],F.test(t))p+=":"+t;else break;else break;d!==e&&(u=!1);u&&(d=(k+l).replace(/[^ .*#\w-]/g,"\\$&")+m+p+c)&&n.push(d);return u}" "===b[e]&&++e;l-1!==e&&" "===b[l]&&--l;for(var n=[],p=e,t=!0,u=e;t&&u<l;++u){var v=b[u];if(D[v]===D||" "===v)m(p,u,v)?p=u+1:t=!1}m(p,l,"")||(t=!1);return t?(n.length&&(p=n.join(""),null!==
+c&&(p="."+c+" "+p),k.push(p)),!0):!d||d(b.slice(e,l))}var c=a.na,f=a.L,g=a.Aa,k=[],l=0,m,n=0,p;for(m=0;m<b.length;++m)(p=b[m],"("==p||"["==p?(++n,0):")"==p||"]"==p?(n&&--n,0):" "==b[m]&&(n||D[b[m-1]]===D||D[b[m+1]]===D))||(b[l++]=b[m]);b.length=l;l=b.length;for(m=n=0;m<l;++m)if(","===b[m]){if(!e(n,m))return null;n=m+1}return e(n,l)?k:null};(function(){var b=/^\w/,a=/^(?:(?:(?:(?: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;
m=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)?b.test(d)?d:"not all , "+d:"not all":""}})();(function(){function b(b){var a=/^\s*[']([^']*)[']\s*$/,d=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,e=/^\s*url\s*[(][']([^']*)['][)]\s*$/,c=/^\s*url\s*[(]([^)]*)[)]\s*$/,f;return(f=/^\s*["]([^"]*)["]\s*$/.exec(b))||(f=a.exec(b))||(f=d.exec(b))||(f=e.exec(b))||(f=c.exec(b))?f[1]:null}function a(d,e,c,l,t,u,q){function v(){z=
H.length&&null===H[H.length-1]}var y=void 0,x=q||[0],H=[],z=!1;n(e,{startStylesheet:function(){y=[]},endStylesheet:function(){},startAtrule:function(e,g){if(z)e=null;else if("@media"===e)y.push("@media"," ",m(g));else if("@keyframes"===e||"@-webkit-keyframes"===e){var k=g[0];1!==g.length||/__$|[^\w\-]/.test(k)?e=null:(y.push(e," ",k+c.L),e="@keyframes")}else if("@import"===e&&0<g.length)if(e=null,"function"===typeof u){var n=m(g.slice(1));if("not all"!==n){++x[0];var q=[];y.push(q);var v=p(f(d,b(g[0])),
function(b){var d=a(v,b.qa,c,l,t,u,x);--x[0];b=n?{toString:function(){return"@media "+n+" {"+d.result+"}"}}:d.result;q[0]=b;u(b,!!x[0])},t)}}else window.console&&window.console.log("@import "+g.join(" ")+" elided");z=!e;H.push(e)},endAtrule:function(){H.pop();z||y.push(";");v()},startBlock:function(){z||y.push("{")},endBlock:function(){z||(y.push("}"),z=!0)},startRuleset:function(b){if(!z){var a=void 0;"@keyframes"===H[H.length-1]?(a=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
@@ -82,16 +82,16 @@ time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"
q.URIEFFECTS=q.J;q.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};q.ltypes=q.M;q.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};q.LOADERTYPES=q.I;"undefined"!==typeof window&&(window.html4=q);a=function(b){function a(b,a){var d;if(V.hasOwnProperty(a))d=V[a];else{var e=a.match(O);d=e?String.fromCharCode(parseInt(e[1],10)):(e=a.match(G))?String.fromCharCode(parseInt(e[1],
16)):R&&W.test(a)?(R.innerHTML="&"+a+";",e=R.textContent,V[a]=e):"&"+a+";"}return d}function d(b){return b.replace(Z,a)}function c(b){return(""+b).replace(N,"&amp;").replace(X,"&lt;").replace(da,"&gt;").replace(ea,"&#34;")}function f(b){return b.replace(Q,"&amp;$1").replace(X,"&lt;").replace(da,"&gt;")}function g(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,d){var e,c=/(<\/|<\!--|<[!?]|[&<>])/g;
e=b+"";if(aa)e=e.split(c);else{for(var f=[],g=0,k;null!==(k=c.exec(e));)f.push(e.substring(g,k.index)),f.push(k[0]),g=k.index+k[0].length;f.push(e.substring(g));e=f}l(a,e,0,{r:!1,C:!1},d)}}function k(b,a,d,e,c){return function(){l(b,a,d,e,c)}}function l(a,d,e,c,f){try{a.H&&0==e&&a.H(f);for(var g,l,p,t=d.length;e<t;){var q=d[e++],u=d[e];switch(q){case "&":P.test(u)?(a.e&&a.e("&"+u,f,T,k(a,d,e,c,f)),e++):a.e&&a.e("&amp;",f,T,k(a,d,e,c,f));break;case "</":if(g=/^([-\w:]+)[^\'\"]*/.exec(u))if(g[0].length===
-u.length&&">"===d[e+1])e+=2,p=g[1].toLowerCase(),a.t&&a.t(p,f,T,k(a,d,e,c,f));else{var v=d,y=e,x=a,H=f,z=T,A=c,D=n(v,y);D?(x.t&&x.t(D.name,H,z,k(x,v,y,A,H)),e=D.next):e=v.length}else a.e&&a.e("&lt;/",f,T,k(a,d,e,c,f));break;case "<":if(g=/^([-\w:]+)\s*\/?/.exec(u))if(g[0].length===u.length&&">"===d[e+1]){e+=2;p=g[1].toLowerCase();a.w&&a.w(p,[],f,T,k(a,d,e,c,f));var B=b.f[p];B&ba&&(e=m(d,{name:p,next:e,c:B},a,f,T,c))}else{var v=d,y=a,x=f,H=T,z=c,G=n(v,e);G?(y.w&&y.w(G.name,G.R,x,H,k(y,v,G.next,z,x)),
-e=G.c&ba?m(v,G,y,x,H,z):G.next):e=v.length}else a.e&&a.e("&lt;",f,T,k(a,d,e,c,f));break;case "\x3c!--":if(!c.C){for(l=e+1;l<t&&(">"!==d[l]||!/--$/.test(d[l-1]));l++);if(l<t){if(a.A){var E=d.slice(e,l).join("");a.A(E.substr(0,E.length-2),f,T,k(a,d,l+1,c,f))}e=l+1}else c.C=!0}c.C&&a.e&&a.e("&lt;!--",f,T,k(a,d,e,c,f));break;case "<!":if(/^\w/.test(u)){if(!c.r){for(l=e+1;l<t&&">"!==d[l];l++);l<t?e=l+1:c.r=!0}c.r&&a.e&&a.e("&lt;!",f,T,k(a,d,e,c,f))}else a.e&&a.e("&lt;!",f,T,k(a,d,e,c,f));break;case "<?":if(!c.r){for(l=
+u.length&&">"===d[e+1])e+=2,p=g[1].toLowerCase(),a.t&&a.t(p,f,T,k(a,d,e,c,f));else{var v=d,y=e,x=a,H=f,A=T,z=c,B=n(v,y);B?(x.t&&x.t(B.name,H,A,k(x,v,y,z,H)),e=B.next):e=v.length}else a.e&&a.e("&lt;/",f,T,k(a,d,e,c,f));break;case "<":if(g=/^([-\w:]+)\s*\/?/.exec(u))if(g[0].length===u.length&&">"===d[e+1]){e+=2;p=g[1].toLowerCase();a.w&&a.w(p,[],f,T,k(a,d,e,c,f));var E=b.f[p];E&ba&&(e=m(d,{name:p,next:e,c:E},a,f,T,c))}else{var v=d,y=a,x=f,H=T,A=c,G=n(v,e);G?(y.w&&y.w(G.name,G.R,x,H,k(y,v,G.next,A,x)),
+e=G.c&ba?m(v,G,y,x,H,A):G.next):e=v.length}else a.e&&a.e("&lt;",f,T,k(a,d,e,c,f));break;case "\x3c!--":if(!c.C){for(l=e+1;l<t&&(">"!==d[l]||!/--$/.test(d[l-1]));l++);if(l<t){if(a.A){var D=d.slice(e,l).join("");a.A(D.substr(0,D.length-2),f,T,k(a,d,l+1,c,f))}e=l+1}else c.C=!0}c.C&&a.e&&a.e("&lt;!--",f,T,k(a,d,e,c,f));break;case "<!":if(/^\w/.test(u)){if(!c.r){for(l=e+1;l<t&&">"!==d[l];l++);l<t?e=l+1:c.r=!0}c.r&&a.e&&a.e("&lt;!",f,T,k(a,d,e,c,f))}else a.e&&a.e("&lt;!",f,T,k(a,d,e,c,f));break;case "<?":if(!c.r){for(l=
e+1;l<t&&">"!==d[l];l++);l<t?e=l+1:c.r=!0}c.r&&a.e&&a.e("&lt;?",f,T,k(a,d,e,c,f));break;case ">":a.e&&a.e("&gt;",f,T,k(a,d,e,c,f));break;case "":break;default:a.e&&a.e(q,f,T,k(a,d,e,c,f))}}a.B&&a.B(f)}catch(ga){if(ga!==T)throw ga;}}function m(a,d,e,c,g,l){var m=a.length;Y.hasOwnProperty(d.name)||(Y[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var n=Y[d.name],p=d.next,t=d.next+1;t<m&&("</"!==a[t-1]||!n.test(a[t]));t++);t<m&&--t;m=a.slice(p,t).join("");if(d.c&b.c.CDATA)e.z&&e.z(m,c,g,k(e,a,
t,l,c));else if(d.c&b.c.RCDATA)e.F&&e.F(f(m),c,g,k(e,a,t,l,c));else throw Error("bug");return t}function n(a,e){var c=/^([-\w:]+)/.exec(a[e]),f={};f.name=c[1].toLowerCase();f.c=b.f[f.name];for(var g=a[e].substr(c[0].length),k=e+1,l=a.length;k<l&&">"!==a[k];k++)g+=a[k];if(!(l<=k)){for(var m=[];""!==g;)if(c=S.exec(g))if(c[4]&&!c[5]||c[6]&&!c[7]){for(var c=c[4]||c[6],n=!1,g=[g,a[k++]];k<l;k++){if(n){if(">"===a[k])break}else 0<=a[k].indexOf(c)&&(n=!0);g.push(a[k])}if(l<=k)break;g=g.join("")}else{var n=
c[1].toLowerCase(),p;if(c[2]){p=c[3];var t=p.charCodeAt(0);if(34===t||39===t)p=p.substr(1,p.length-2);p=d(p.replace(ca,""))}else p="";m.push(n,p);g=g.substr(c[0].length)}else g=g.replace(/^[\s\S][^a-z\s]*/,"");f.R=m;f.next=k+1;return f}}function p(a){function d(b,a){f||a.push(b)}var e,f;return g({startDoc:function(){e=[];f=!1},startTag:function(d,g,k){if(!f&&b.f.hasOwnProperty(d)){var l=b.f[d];if(!(l&b.c.FOLDABLE)){var m=a(d,g);if(m){if("object"!==typeof m)throw Error("tagPolicy did not return object (old API?)");
-if("attribs"in m)g=m.attribs;else throw Error("tagPolicy gave no attribs");var n;"tagName"in m?(n=m.tagName,m=b.f[n]):(n=d,m=l);if(l&b.c.OPTIONAL_ENDTAG){var p=e[e.length-1];p&&p.D===d&&(p.v!==n||d!==n)&&k.push("</",p.v,">")}l&b.c.EMPTY||e.push({D:d,v:n});k.push("<",n);d=0;for(p=g.length;d<p;d+=2){var t=g[d],u=g[d+1];null!==u&&void 0!==u&&k.push(" ",t,'="',c(u),'"')}k.push(">");l&b.c.EMPTY&&!(m&b.c.EMPTY)&&k.push("</",n,">")}else f=!(l&b.c.EMPTY)}}},endTag:function(a,d){if(f)f=!1;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=e.length;0<=--c;){var g=e[c].D;if(g===a)break;if(!(b.f[g]&b.c.OPTIONAL_ENDTAG))return}else for(c=e.length;0<=--c&&e[c].D!==a;);if(!(0>c)){for(g=e.length;--g>c;){var k=e[g].v;b.f[k]&b.c.OPTIONAL_ENDTAG||d.push("</",k,">")}c<e.length&&(a=e[c].v);e.length=c;d.push("</",a,">")}}}},pcdata:d,rcdata:d,cdata:d,endDoc:function(b){for(;e.length;e.length--)b.push("</",e[e.length-1].v,">")}})}function u(b,a,d,c,f){if(!f)return null;try{var g=
-e.parse(""+b);if(g&&(!g.K()||ha.test(g.W()))){var k=f(g,a,d,c);return k?k.toString():null}}catch(ma){}return null}function q(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 H(b,a,d){a=a+"::"+d;if(b.hasOwnProperty(a))return b[a];a="*::"+d;if(b.hasOwnProperty(a))return b[a]}function J(a,d,e,c,f){for(var g=0;g<d.length;g+=2){var k=d[g],l=d[g+1],m=l,n=null,p;if((p=
-a+"::"+k,b.m.hasOwnProperty(p))||(p="*::"+k,b.m.hasOwnProperty(p)))n=b.m[p];if(null!==n)switch(n){case b.d.NONE:break;case b.d.SCRIPT:l=null;f&&q(f,a,k,m,l);break;case b.d.STYLE:if("undefined"===typeof M){l=null;f&&q(f,a,k,m,l);break}var t=[];M(l,{declaration:function(a,d){var c=a.toLowerCase();U(c,d,e?function(a){return u(a,b.P.ja,b.M.ka,{TYPE:"CSS",CSS_PROP:c},e)}:null);d.length&&t.push(c+": "+d.join(" "))}});l=0<t.length?t.join(" ; "):null;f&&q(f,a,k,m,l);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:l=
-c?c(l):l;f&&q(f,a,k,m,l);break;case b.d.URI:l=u(l,H(b.J,a,k),H(b.I,a,k),{TYPE:"MARKUP",XML_ATTR:k,XML_TAG:a},e);f&&q(f,a,k,m,l);break;case b.d.URI_FRAGMENT:l&&"#"===l.charAt(0)?(l=l.substring(1),l=c?c(l):l,null!==l&&void 0!==l&&(l="#"+l)):l=null;f&&q(f,a,k,m,l);break;default:l=null,f&&q(f,a,k,m,l)}else l=null,f&&q(f,a,k,m,l);d[g+1]=l}return d}function I(a,d,e){return function(c,f){if(b.f[c]&b.c.UNSAFE)e&&q(e,c,void 0,void 0,void 0);else return{attribs:J(c,f,a,d,e)}}}function L(b,a){var d=[];p(a)(b,
+if("attribs"in m)g=m.attribs;else throw Error("tagPolicy gave no attribs");var n;"tagName"in m?(n=m.tagName,m=b.f[n]):(n=d,m=l);if(l&b.c.OPTIONAL_ENDTAG){var p=e[e.length-1];p&&p.D===d&&(p.v!==n||d!==n)&&k.push("</",p.v,">")}l&b.c.EMPTY||e.push({D:d,v:n});k.push("<",n);d=0;for(p=g.length;d<p;d+=2){var t=g[d],q=g[d+1];null!==q&&void 0!==q&&k.push(" ",t,'="',c(q),'"')}k.push(">");l&b.c.EMPTY&&!(m&b.c.EMPTY)&&k.push("</",n,">")}else f=!(l&b.c.EMPTY)}}},endTag:function(a,d){if(f)f=!1;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=e.length;0<=--c;){var g=e[c].D;if(g===a)break;if(!(b.f[g]&b.c.OPTIONAL_ENDTAG))return}else for(c=e.length;0<=--c&&e[c].D!==a;);if(!(0>c)){for(g=e.length;--g>c;){var k=e[g].v;b.f[k]&b.c.OPTIONAL_ENDTAG||d.push("</",k,">")}c<e.length&&(a=e[c].v);e.length=c;d.push("</",a,">")}}}},pcdata:d,rcdata:d,cdata:d,endDoc:function(b){for(;e.length;e.length--)b.push("</",e[e.length-1].v,">")}})}function q(b,a,d,c,f){if(!f)return null;try{var g=
+e.parse(""+b);if(g&&(!g.K()||ha.test(g.W()))){var k=f(g,a,d,c);return k?k.toString():null}}catch(ma){}return null}function u(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 H(b,a,d){a=a+"::"+d;if(b.hasOwnProperty(a))return b[a];a="*::"+d;if(b.hasOwnProperty(a))return b[a]}function J(a,d,e,c,f){for(var g=0;g<d.length;g+=2){var k=d[g],l=d[g+1],m=l,n=null,p;if((p=
+a+"::"+k,b.m.hasOwnProperty(p))||(p="*::"+k,b.m.hasOwnProperty(p)))n=b.m[p];if(null!==n)switch(n){case b.d.NONE:break;case b.d.SCRIPT:l=null;f&&u(f,a,k,m,l);break;case b.d.STYLE:if("undefined"===typeof M){l=null;f&&u(f,a,k,m,l);break}var t=[];M(l,{declaration:function(a,d){var c=a.toLowerCase();U(c,d,e?function(a){return q(a,b.P.ja,b.M.ka,{TYPE:"CSS",CSS_PROP:c},e)}:null);d.length&&t.push(c+": "+d.join(" "))}});l=0<t.length?t.join(" ; "):null;f&&u(f,a,k,m,l);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:l=
+c?c(l):l;f&&u(f,a,k,m,l);break;case b.d.URI:l=q(l,H(b.J,a,k),H(b.I,a,k),{TYPE:"MARKUP",XML_ATTR:k,XML_TAG:a},e);f&&u(f,a,k,m,l);break;case b.d.URI_FRAGMENT:l&&"#"===l.charAt(0)?(l=l.substring(1),l=c?c(l):l,null!==l&&void 0!==l&&(l="#"+l)):l=null;f&&u(f,a,k,m,l);break;default:l=null,f&&u(f,a,k,m,l)}else l=null,f&&u(f,a,k,m,l);d[g+1]=l}return d}function I(a,d,e){return function(c,f){if(b.f[c]&b.c.UNSAFE)e&&u(e,c,void 0,void 0,void 0);else return{attribs:J(c,f,a,d,e)}}}function L(b,a){var d=[];p(a)(b,
d);return d.join("")}var M,U;"undefined"!==typeof window&&(M=window.parseCssDeclarations,U=window.sanitizeCssProperty);var V={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},O=/^#(\d+)$/,G=/^#x([0-9A-Fa-f]+)$/,W=/^[A-Za-z][A-za-z0-9]+$/,R="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,ca=/\0/g,Z=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,P=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,N=/&/g,Q=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,X=
/[<]/g,da=/>/g,ea=/\"/g,S=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,aa=3==="a,b".split(/(,)/).length,ba=b.c.CDATA|b.c.RCDATA,T={},Y={},ha=/^(?:https?|mailto|data)$/i,fa={};fa.pa=fa.escapeAttrib=c;fa.ra=fa.makeHtmlSanitizer=p;fa.sa=fa.makeSaxParser=g;fa.ta=fa.makeTagPolicy=I;fa.wa=fa.normalizeRCData=f;fa.xa=fa.sanitize=function(b,a,d,e){return L(b,I(a,d,e))};fa.ya=fa.sanitizeAttribs=J;fa.za=fa.sanitizeWithPolicy=L;fa.Ba=fa.unescapeEntities=d;return fa}(q);
f=a.sanitize;"undefined"!==typeof window&&(window.html=a,window.html_sanitize=f)})();
@@ -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!==q)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===q):2!==c||(this.onEnd(q),f.avail_out=0,!0)};b.prototype.onData=
function(b){this.chunks.push(b)};b.prototype.onEnd=function(b){b===q&&("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 q;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"),q=c("./zlib/gzheader"),u=Object.prototype.toString;b.prototype.push=function(b,d){var e,c,f,n,p,t,q=this.strm,v=this.options.chunkSize,D=this.options.dictionary,K=!1;if(this.ended)return!1;c=d===~~d?d:!0===d?m.Z_FINISH:m.Z_NO_FLUSH;
-"string"==typeof b?q.input=l.binstring2buf(b):"[object ArrayBuffer]"===u.call(b)?q.input=new Uint8Array(b):q.input=b;q.next_in=0;q.avail_in=q.input.length;do{if(0===q.avail_out&&(q.output=new k.Buf8(v),q.next_out=0,q.avail_out=v),e=g.inflate(q,m.Z_NO_FLUSH),e===m.Z_NEED_DICT&&D&&(t="string"==typeof D?l.string2buf(D):"[object ArrayBuffer]"===u.call(D)?new Uint8Array(D):D,e=g.inflateSetDictionary(this.strm,t)),e===m.Z_BUF_ERROR&&!0===K&&(e=m.Z_OK,K=!1),e!==m.Z_STREAM_END&&e!==m.Z_OK)return this.onEnd(e),
+this.header=new q;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"),q=c("./zlib/gzheader"),u=Object.prototype.toString;b.prototype.push=function(b,d){var e,c,f,n,p,t,q=this.strm,v=this.options.chunkSize,E=this.options.dictionary,K=!1;if(this.ended)return!1;c=d===~~d?d:!0===d?m.Z_FINISH:m.Z_NO_FLUSH;
+"string"==typeof b?q.input=l.binstring2buf(b):"[object ArrayBuffer]"===u.call(b)?q.input=new Uint8Array(b):q.input=b;q.next_in=0;q.avail_in=q.input.length;do{if(0===q.avail_out&&(q.output=new k.Buf8(v),q.next_out=0,q.avail_out=v),e=g.inflate(q,m.Z_NO_FLUSH),e===m.Z_NEED_DICT&&E&&(t="string"==typeof E?l.string2buf(E):"[object ArrayBuffer]"===u.call(E)?new Uint8Array(E):E,e=g.inflateSetDictionary(this.strm,t)),e===m.Z_BUF_ERROR&&!0===K&&(e=m.Z_OK,K=!1),e!==m.Z_STREAM_END&&e!==m.Z_OK)return this.onEnd(e),
this.ended=!0,!1;q.next_out&&(0!==q.avail_out&&e!==m.Z_STREAM_END&&(0!==q.avail_in||c!==m.Z_FINISH&&c!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(q.output,q.next_out),n=q.next_out-f,p=l.buf2string(q.output,f),q.next_out=n,q.avail_out=v-n,n&&k.arraySet(q.output,q.output,f,n,0),this.onData(p)):this.onData(k.shrinkBuf(q.output,q.next_out))));0===q.avail_in&&0===q.avail_out&&(K=!0)}while((0<q.avail_in||0===q.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),q.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,10 +113,10 @@ new e.Buf8(256);for(c=0;256>c;c++)l[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,m=e||d.length,n=Array(2*m);for(c=f=0;c<m;)if(g=d[c++],128>g)n[f++]=g;else if(k=l[g],4<k)n[f++]=65533,c+=k-1;else{for(g&=
2===k?31:3===k?15:7;1<k&&c<m;)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+l[b[e]]>d?e:d}},{"./common":3}],5:[function(c,f,d){f.exports=function(b,d,c,f){var e=65535&b|0;b=b>>>16&65535|0;for(var g;0!==c;){g=2E3<c?2E3:c;c-=g;do e=e+d[f++]|0,b=b+e|0;while(--g);e%=65521;b%=65521}return e|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=D[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&&(z.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))}
+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&&(z.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,t=b.prev,q=b.strstart+Q,u=n[g+k-1],v=n[g+k];b.prev_length>=b.good_match&&(f>>=
2);l>b.lookahead&&(l=b.lookahead);do if(e=d,n[e+k]===v&&n[e+k-1]===u&&n[e]===n[g]&&n[++e]===n[g+1]){g+=2;for(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]&&n[++g]===n[++e]&&g<q;);if(c=Q-(q-g),g=q-Q,c>k){if(b.match_start=d,k=c,c>=l)break;u=n[g+k-1];v=n[g+k]}}while((d=t[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)){z.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,z.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=F(d.adler,c,l,k):2===d.state.wrap&&(d.adler=E(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)),b.lookahead+=e,b.lookahead+
+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,z.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=F(d.adler,c,l,k):2===d.state.wrap&&(d.adler=D(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)),b.lookahead+=e,b.lookahead+
b.insert>=N)for(f=b.strstart-b.insert,b.ins_h=b.window[f],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+N-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<N)););}while(b.lookahead<X&&0!==b.strm.avail_in)}function q(b,d){for(var e,c;;){if(b.lookahead<X){if(p(b),b.lookahead<X&&d===K)return S;if(0===b.lookahead)break}if(e=0,b.lookahead>=N&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+
N-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>=N)if(c=C._tr_tally(b,b.strstart-b.match_start,b.match_length-N),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=N){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+N-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<N-1?b.strstart:N-1,d===H?(k(b,!0),0===b.strm.avail_out?ba:T):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?S:aa}function u(b,d){for(var e,c,f;;){if(b.lookahead<X){if(p(b),b.lookahead<X&&d===K)return S;
@@ -127,58 +127,58 @@ this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzin
this.ins_h=0;this.dyn_ltree=new z.Buf16(2*Z);this.dyn_dtree=new z.Buf16(2*(2*R+1));this.bl_tree=new z.Buf16(2*(2*ca+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 z.Buf16(P+1);this.heap=new z.Buf16(2*W+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new z.Buf16(2*W+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 y(d){var e;
return d&&d.state?(d.total_in=d.total_out=0,d.data_type=V,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?da:ea,d.adler=2===e.wrap?0:1,e.last_flush=K,C._tr_init(e),J):b(d,I)}function x(b){var d=y(b);d===J&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=B[b.level].max_lazy,b.good_match=B[b.level].good_length,b.nice_match=B[b.level].nice_length,b.max_chain_length=B[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
b.prev_length=N-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>G||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 v;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+N-1)/N),m.window=new z.Buf8(2*m.w_size),m.head=new z.Buf16(m.hash_size),
-m.prev=new z.Buf16(m.w_size),m.lit_bufsize=1<<g+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new z.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,x(d)}var B,z=c("../utils/common"),C=c("./trees"),F=c("./adler32"),E=c("./crc32"),D=c("./messages"),K=0,H=4,J=0,I=-2,L=-1,M=1,U=4,V=2,O=8,G=9,W=286,R=30,ca=19,Z=2*W+1,P=15,N=3,Q=258,X=Q+N+1,da=42,ea=113,S=1,aa=2,ba=3,T=4;B=[new t(0,0,0,0,function(b,d){var e=65535;for(e>b.pending_buf_size-5&&
+m.prev=new z.Buf16(m.w_size),m.lit_bufsize=1<<g+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new z.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,x(d)}var B,z=c("../utils/common"),C=c("./trees"),F=c("./adler32"),D=c("./crc32"),E=c("./messages"),K=0,H=4,J=0,I=-2,L=-1,M=1,U=4,V=2,O=8,G=9,W=286,R=30,ca=19,Z=2*W+1,P=15,N=3,Q=258,X=Q+N+1,da=42,ea=113,S=1,aa=2,ba=3,T=4;B=[new t(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===K)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-X&&(k(b,!1),0===b.strm.avail_out))return S}return b.insert=0,d===H?(k(b,!0),0===b.strm.avail_out?ba:T):(b.strstart>b.block_start&&k(b,!1),S)}),new t(4,4,8,4,q),new t(4,5,16,8,q),new t(4,6,
32,32,q),new t(4,4,16,16,u),new t(8,16,32,32,u),new t(8,16,128,128,u),new t(8,32,128,256,u),new t(32,128,258,1024,u),new t(32,258,258,4096,u)];d.deflateInit=function(b,d){return A(b,d,O,15,8,0)};d.deflateInit2=A;d.deflateReset=x;d.deflateResetKeep=y;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?I:(b.state.gzhead=d,J):I};d.deflate=function(d,c){var f,n,t,q;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!==H)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),l(n,n.gzhead.extra.length>>
-8&255)),n.gzhead.hcrc&&(d.adler=E(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=ea)):(t=O+(n.w_bits-8<<4)<<8,t|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(t|=32),n.status=ea,m(n,t+(31-t%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(t=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==
-n.pending_buf_size||(n.gzhead.hcrc&&n.pending>t&&(d.adler=E(d.adler,n.pending_buf,n.pending-t,t)),g(d),t=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>t&&(d.adler=E(d.adler,n.pending_buf,n.pending-t,t));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){t=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>t&&(d.adler=E(d.adler,n.pending_buf,n.pending-
-t,t)),g(d),t=n.pending,n.pending===n.pending_buf_size)){q=1;break}q=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,q)}while(0!==q);n.gzhead.hcrc&&n.pending>t&&(d.adler=E(d.adler,n.pending_buf,n.pending-t,t));0===q&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){t=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>t&&(d.adler=E(d.adler,n.pending_buf,n.pending-t,t)),g(d),t=n.pending,n.pending===n.pending_buf_size)){q=
-1;break}q=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,q)}while(0!==q);n.gzhead.hcrc&&n.pending>t&&(d.adler=E(d.adler,n.pending_buf,n.pending-t,t));0===q&&(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=ea)):n.status=ea),0!==n.pending){if(g(d),0===d.avail_out)return n.last_flush=-1,J}else if(0===d.avail_in&&(c<<1)-
+8&255)),n.gzhead.hcrc&&(d.adler=D(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=ea)):(t=O+(n.w_bits-8<<4)<<8,t|=(2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(t|=32),n.status=ea,m(n,t+(31-t%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(t=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==
+n.pending_buf_size||(n.gzhead.hcrc&&n.pending>t&&(d.adler=D(d.adler,n.pending_buf,n.pending-t,t)),g(d),t=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>t&&(d.adler=D(d.adler,n.pending_buf,n.pending-t,t));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){t=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>t&&(d.adler=D(d.adler,n.pending_buf,n.pending-
+t,t)),g(d),t=n.pending,n.pending===n.pending_buf_size)){q=1;break}q=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,q)}while(0!==q);n.gzhead.hcrc&&n.pending>t&&(d.adler=D(d.adler,n.pending_buf,n.pending-t,t));0===q&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){t=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>t&&(d.adler=D(d.adler,n.pending_buf,n.pending-t,t)),g(d),t=n.pending,n.pending===n.pending_buf_size)){q=
+1;break}q=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,q)}while(0!==q);n.gzhead.hcrc&&n.pending>t&&(d.adler=D(d.adler,n.pending_buf,n.pending-t,t));0===q&&(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=ea)):n.status=ea),0!==n.pending){if(g(d),0===d.avail_out)return n.last_flush=-1,J}else if(0===d.avail_in&&(c<<1)-
(4<c?9:0)<=(f<<1)-(4<f?9:0)&&c!==H)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!==K&&666!==n.status){var u;if(2===n.strategy)a:{for(var v;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===K){u=S;break a}break}if(n.match_length=0,v=C._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,v&&(k(n,!1),0===n.strm.avail_out)){u=S;break a}}u=(n.insert=0,c===H?(k(n,!0),0===n.strm.avail_out?ba:T):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?
S:aa)}else if(3===n.strategy)a:{var y,x;for(v=n.window;;){if(n.lookahead<=Q){if(p(n),n.lookahead<=Q&&c===K){u=S;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=N&&0<n.strstart&&(x=n.strstart-1,y=v[x],y===v[++x]&&y===v[++x]&&y===v[++x])){for(f=n.strstart+Q;y===v[++x]&&y===v[++x]&&y===v[++x]&&y===v[++x]&&y===v[++x]&&y===v[++x]&&y===v[++x]&&y===v[++x]&&x<f;);n.match_length=Q-(f-x);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=N?(u=C._tr_tally(n,1,n.match_length-
N),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(u=C._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),u&&(k(n,!1),0===n.strm.avail_out)){u=S;break a}}u=(n.insert=0,c===H?(k(n,!0),0===n.strm.avail_out?ba:T):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?S:aa)}else u=B[n.level].func(n,c);if(u!==ba&&u!==T||(n.status=666),u===S||u===ba)return 0===d.avail_out&&(n.last_flush=-1),J;if(u===aa&&(1===c?C._tr_align(n):5!==c&&(C._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,J}return c!==H?J: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?J: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!==ea&&666!==e?b(d,I):(d.state=null,e===ea?b(d,-3):J)):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=F(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 z.Buf8(c.w_size),z.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>=
N;){f=c.strstart;g=c.lookahead-(N-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[f+N-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=N-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=N-1,c.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,c.wrap=k,J};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 e,c,f,m,n,p,q,u,t,v,y,x,A,B,z,C,F,E,D,K,H,J,I,L;e=b.state;c=b.next_in;I=b.input;f=c+(b.avail_in-5);m=b.next_out;L=b.output;n=m-(d-b.avail_out);p=m+(b.avail_out-257);q=e.dmax;u=e.wsize;t=e.whave;v=e.wnext;y=e.window;x=e.hold;A=e.bits;B=e.lencode;z=e.distcode;C=(1<<e.lenbits)-
-1;F=(1<<e.distbits)-1;a:do b:for(15>A&&(x+=I[c++]<<A,A+=8,x+=I[c++]<<A,A+=8),E=B[x&C];;){if(D=E>>>24,x>>>=D,A-=D,D=E>>>16&255,0===D)L[m++]=65535&E;else{if(!(16&D)){if(0===(64&D)){E=B[(65535&E)+(x&(1<<D)-1)];continue b}if(32&D){e.mode=12;break a}b.msg="invalid literal/length code";e.mode=30;break a}K=65535&E;(D&=15)&&(A<D&&(x+=I[c++]<<A,A+=8),K+=x&(1<<D)-1,x>>>=D,A-=D);15>A&&(x+=I[c++]<<A,A+=8,x+=I[c++]<<A,A+=8);E=z[x&F];c:for(;;){if(D=E>>>24,x>>>=D,A-=D,D=E>>>16&255,!(16&D)){if(0===(64&D)){E=z[(65535&
-E)+(x&(1<<D)-1)];continue c}b.msg="invalid distance code";e.mode=30;break a}if(H=65535&E,D&=15,A<D&&(x+=I[c++]<<A,A+=8,A<D&&(x+=I[c++]<<A,A+=8)),H+=x&(1<<D)-1,H>q){b.msg="invalid distance too far back";e.mode=30;break a}if(x>>>=D,A-=D,D=m-n,H>D){if(D=H-D,D>t&&e.sane){b.msg="invalid distance too far back";e.mode=30;break a}if(E=0,J=y,0===v){if(E+=u-D,D<K){K-=D;do L[m++]=y[E++];while(--D);E=m-H;J=L}}else if(v<D){if(E+=u+v-D,D-=v,D<K){K-=D;do L[m++]=y[E++];while(--D);if(E=0,v<K){D=v;K-=D;do L[m++]=y[E++];
-while(--D);E=m-H;J=L}}}else if(E+=v-D,D<K){K-=D;do L[m++]=y[E++];while(--D);E=m-H;J=L}for(;2<K;)L[m++]=J[E++],L[m++]=J[E++],L[m++]=J[E++],K-=3;K&&(L[m++]=J[E++],1<K&&(L[m++]=J[E++]))}else{E=m-H;do L[m++]=L[E++],L[m++]=L[E++],L[m++]=L[E++],K-=3;while(2<K);K&&(L[m++]=L[E++],1<K&&(L[m++]=L[E++]))}break}}break}while(c<f&&m<p);K=A>>3;c-=K;A-=K<<3;b.next_in=c;b.next_out=m;b.avail_in=c<f?5+(f-c):5-(c-f);b.avail_out=m<p?257+(p-m):257-(m-p);e.hold=x&(1<<A)-1;e.bits=A}},{}],11:[function(c,f,d){function b(b){return(b>>>
+"./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 e,c,f,m,n,p,q,u,t,v,y,x,A,B,z,C,F,D,E,K,H,J,I,L;e=b.state;c=b.next_in;I=b.input;f=c+(b.avail_in-5);m=b.next_out;L=b.output;n=m-(d-b.avail_out);p=m+(b.avail_out-257);q=e.dmax;u=e.wsize;t=e.whave;v=e.wnext;y=e.window;x=e.hold;A=e.bits;B=e.lencode;z=e.distcode;C=(1<<e.lenbits)-
+1;F=(1<<e.distbits)-1;a:do b:for(15>A&&(x+=I[c++]<<A,A+=8,x+=I[c++]<<A,A+=8),D=B[x&C];;){if(E=D>>>24,x>>>=E,A-=E,E=D>>>16&255,0===E)L[m++]=65535&D;else{if(!(16&E)){if(0===(64&E)){D=B[(65535&D)+(x&(1<<E)-1)];continue b}if(32&E){e.mode=12;break a}b.msg="invalid literal/length code";e.mode=30;break a}K=65535&D;(E&=15)&&(A<E&&(x+=I[c++]<<A,A+=8),K+=x&(1<<E)-1,x>>>=E,A-=E);15>A&&(x+=I[c++]<<A,A+=8,x+=I[c++]<<A,A+=8);D=z[x&F];c:for(;;){if(E=D>>>24,x>>>=E,A-=E,E=D>>>16&255,!(16&E)){if(0===(64&E)){D=z[(65535&
+D)+(x&(1<<E)-1)];continue c}b.msg="invalid distance code";e.mode=30;break a}if(H=65535&D,E&=15,A<E&&(x+=I[c++]<<A,A+=8,A<E&&(x+=I[c++]<<A,A+=8)),H+=x&(1<<E)-1,H>q){b.msg="invalid distance too far back";e.mode=30;break a}if(x>>>=E,A-=E,E=m-n,H>E){if(E=H-E,E>t&&e.sane){b.msg="invalid distance too far back";e.mode=30;break a}if(D=0,J=y,0===v){if(D+=u-E,E<K){K-=E;do L[m++]=y[D++];while(--E);D=m-H;J=L}}else if(v<E){if(D+=u+v-E,E-=v,E<K){K-=E;do L[m++]=y[D++];while(--E);if(D=0,v<K){E=v;K-=E;do L[m++]=y[D++];
+while(--E);D=m-H;J=L}}}else if(D+=v-E,E<K){K-=E;do L[m++]=y[D++];while(--E);D=m-H;J=L}for(;2<K;)L[m++]=J[D++],L[m++]=J[D++],L[m++]=J[D++],K-=3;K&&(L[m++]=J[D++],1<K&&(L[m++]=J[D++]))}else{D=m-H;do L[m++]=L[D++],L[m++]=L[D++],L[m++]=L[D++],K-=3;while(2<K);K&&(L[m++]=L[D++],1<K&&(L[m++]=L[D++]))}break}}break}while(c<f&&m<p);K=A>>3;c-=K;A-=K<<3;b.next_in=c;b.next_out=m;b.avail_in=c<f?5+(f-c):5-(c-f);b.avail_out=m<p?257+(p-m):257-(m-p);e.hold=x&(1<<A)-1;e.bits=A}},{}],11:[function(c,f,d){function b(b){return(b>>>
24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function e(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new u.Buf16(320);this.work=new u.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=z,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new u.Buf32(C),d.distcode=d.distdyn=new u.Buf32(F),d.sane=1,d.back=-1,A):B}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):B}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)?B:(null!==c.window&&c.wbits!==d&&(c.window=null),c.wrap=e,c.wbits=d,k(b))):B}function m(b,d){var c,f;return b?(f=new e,b.state=f,f.window=null,c=l(b,d),c!==A&&(b.state=null),c):B}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 u.Buf8(b.wsize)),c>=b.wsize?(u.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),u.arraySet(b.window,d,e-c,f,b.wnext),c-=f,c?(u.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,q,u=c("../utils/common"),t=c("./adler32"),v=c("./crc32"),y=c("./inffast"),x=c("./inftrees"),A=0,B=-2,z=1,C=852,F=592,E=!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,C,G,K,R,F,Z,P,N,Q,X,da,ea,S,aa,ba,T=0,Y=new u.Buf8(4),ha=[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 B;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;C=c.hold;G=c.bits;K=m;R=D;aa=A;a:for(;;)switch(c.mode){case z:if(0===c.wrap){c.mode=13;break}for(;16>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(2&c.wrap&&35615===C){c.check=0;Y[0]=255&C;Y[1]=C>>>8&255;c.check=v(c.check,Y,2,0);G=C=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&C)<<8)+(C>>8))%31){d.msg="incorrect header check";
+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,q,u=c("../utils/common"),t=c("./adler32"),v=c("./crc32"),y=c("./inffast"),x=c("./inftrees"),A=0,B=-2,z=1,C=852,F=592,D=!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,E,C,G,K,R,F,Z,P,N,Q,X,da,ea,S,aa,ba,T=0,Y=new u.Buf8(4),ha=[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 B;c=d.state;12===c.mode&&(c.mode=13);l=d.next_out;g=d.output;E=d.avail_out;k=d.next_in;f=d.input;m=d.avail_in;C=c.hold;G=c.bits;K=m;R=E;aa=A;a:for(;;)switch(c.mode){case z:if(0===c.wrap){c.mode=13;break}for(;16>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(2&c.wrap&&35615===C){c.check=0;Y[0]=255&C;Y[1]=C>>>8&255;c.check=v(c.check,Y,2,0);G=C=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&C)<<8)+(C>>8))%31){d.msg="incorrect header check";
c.mode=30;break}if(8!==(15&C)){d.msg="unknown compression method";c.mode=30;break}if(C>>>=4,G-=4,S=(15&C)+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&C?10:12;G=C=0;break;case 2:for(;16>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(c.flags=C,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=C>>8&1);512&c.flags&&
(Y[0]=255&C,Y[1]=C>>>8&255,c.check=v(c.check,Y,2,0));G=C=0;c.mode=3;case 3:for(;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.head&&(c.head.time=C);512&c.flags&&(Y[0]=255&C,Y[1]=C>>>8&255,Y[2]=C>>>16&255,Y[3]=C>>>24&255,c.check=v(c.check,Y,4,0));G=C=0;c.mode=4;case 4:for(;16>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.head&&(c.head.xflags=255&C,c.head.os=C>>8);512&c.flags&&(Y[0]=255&C,Y[1]=C>>>8&255,c.check=v(c.check,Y,2,0));G=C=0;c.mode=5;case 5:if(1024&c.flags){for(;16>G;){if(0===m)break a;m--;
C+=f[k++]<<G;G+=8}c.length=C;c.head&&(c.head.extra_len=C);512&c.flags&&(Y[0]=255&C,Y[1]=C>>>8&255,c.check=v(c.check,Y,2,0));G=C=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(F=c.length,F>m&&(F=m),F&&(c.head&&(S=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),u.arraySet(c.head.extra,f,k,F,S)),512&c.flags&&(c.check=v(c.check,f,F,k)),m-=F,k+=F,c.length-=F),c.length))break a;c.length=0;c.mode=7;case 7:if(2048&c.flags){if(0===m)break a;F=0;do S=f[k+
F++],c.head&&S&&65536>c.length&&(c.head.name+=String.fromCharCode(S));while(S&&F<m);if(512&c.flags&&(c.check=v(c.check,f,F,k)),m-=F,k+=F,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;F=0;do S=f[k+F++],c.head&&S&&65536>c.length&&(c.head.comment+=String.fromCharCode(S));while(S&&F<m);if(512&c.flags&&(c.check=v(c.check,f,F,k)),m-=F,k+=F,S)break a}else c.head&&(c.head.comment=null);c.mode=9;case 9:if(512&c.flags){for(;16>G;){if(0===m)break a;m--;
-C+=f[k++]<<G;G+=8}if(C!==(65535&c.check)){d.msg="header crc mismatch";c.mode=30;break}G=C=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>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}d.adler=c.check=b(C);G=C=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=C,c.bits=G,2;d.adler=c.check=1;c.mode=12;case 12:if(5===e||6===e)break a;case 13:if(c.last){C>>>=7&G;G-=7&G;c.mode=27;break}for(;3>G;){if(0===
-m)break a;m--;C+=f[k++]<<G;G+=8}switch(c.last=1&C,C>>>=1,--G,3&C){case 0:c.mode=14;break;case 1:Q=c;if(E){p=new u.Buf32(512);q=new u.Buf32(32);for(P=0;144>P;)Q.lens[P++]=8;for(;256>P;)Q.lens[P++]=9;for(;280>P;)Q.lens[P++]=7;for(;288>P;)Q.lens[P++]=8;x(1,Q.lens,0,288,p,0,Q.work,{bits:9});for(P=0;32>P;)Q.lens[P++]=5;x(2,Q.lens,0,32,q,0,Q.work,{bits:5});E=!1}Q.lencode=p;Q.lenbits=9;Q.distcode=q;Q.distbits=5;if(c.mode=20,6===e){C>>>=2;G-=2;break a}break;case 2:c.mode=17;break;case 3:d.msg="invalid block type",
-c.mode=30}C>>>=2;G-=2;break;case 14:C>>>=7&G;for(G-=7&G;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if((65535&C)!==(C>>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&C,C=0,G=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(F=c.length){if(F>m&&(F=m),F>D&&(F=D),0===F)break a;u.arraySet(g,f,k,F,l);m-=F;k+=F;D-=F;l+=F;c.length-=F;break}c.mode=12;break;case 17:for(;14>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(c.nlen=(31&C)+257,C>>>=5,G-=5,c.ndist=(31&C)+
+C+=f[k++]<<G;G+=8}if(C!==(65535&c.check)){d.msg="header crc mismatch";c.mode=30;break}G=C=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>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}d.adler=c.check=b(C);G=C=0;c.mode=11;case 11:if(0===c.havedict)return d.next_out=l,d.avail_out=E,d.next_in=k,d.avail_in=m,c.hold=C,c.bits=G,2;d.adler=c.check=1;c.mode=12;case 12:if(5===e||6===e)break a;case 13:if(c.last){C>>>=7&G;G-=7&G;c.mode=27;break}for(;3>G;){if(0===
+m)break a;m--;C+=f[k++]<<G;G+=8}switch(c.last=1&C,C>>>=1,--G,3&C){case 0:c.mode=14;break;case 1:Q=c;if(D){p=new u.Buf32(512);q=new u.Buf32(32);for(P=0;144>P;)Q.lens[P++]=8;for(;256>P;)Q.lens[P++]=9;for(;280>P;)Q.lens[P++]=7;for(;288>P;)Q.lens[P++]=8;x(1,Q.lens,0,288,p,0,Q.work,{bits:9});for(P=0;32>P;)Q.lens[P++]=5;x(2,Q.lens,0,32,q,0,Q.work,{bits:5});D=!1}Q.lencode=p;Q.lenbits=9;Q.distcode=q;Q.distbits=5;if(c.mode=20,6===e){C>>>=2;G-=2;break a}break;case 2:c.mode=17;break;case 3:d.msg="invalid block type",
+c.mode=30}C>>>=2;G-=2;break;case 14:C>>>=7&G;for(G-=7&G;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if((65535&C)!==(C>>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&C,C=0,G=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(F=c.length){if(F>m&&(F=m),F>E&&(F=E),0===F)break a;u.arraySet(g,f,k,F,l);m-=F;k+=F;E-=F;l+=F;c.length-=F;break}c.mode=12;break;case 17:for(;14>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(c.nlen=(31&C)+257,C>>>=5,G-=5,c.ndist=(31&C)+
1,C>>>=5,G-=5,c.ncode=(15&C)+4,C>>>=4,G-=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>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.lens[ha[c.have++]]=7&C;C>>>=3;G-=3}for(;19>c.have;)c.lens[ha[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ba={bits:c.lenbits},aa=x(0,c.lens,0,19,c.lencode,0,c.work,ba),c.lenbits=ba.bits,aa){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(;T=c.lencode[C&(1<<c.lenbits)-1],N=T>>>24,Q=65535&T,!(N<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(16>Q)C>>>=N,G-=N,c.lens[c.have++]=Q;else{if(16===Q){for(P=N+2;G<P;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(C>>>=N,G-=N,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}S=c.lens[c.have-1];F=3+(3&C);C>>>=2;G-=2}else if(17===Q){for(P=N+3;G<P;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=N;G-=N;S=0;F=3+(7&C);C>>>=3;G-=3}else{for(P=N+7;G<P;){if(0===m)break a;m--;
C+=f[k++]<<G;G+=8}C>>>=N;G-=N;S=0;F=11+(127&C);C>>>=7;G-=7}if(c.have+F>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;F--;)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},aa=x(1,c.lens,0,c.nlen,c.lencode,0,c.work,ba),c.lenbits=ba.bits,aa){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=c.distdyn,ba={bits:c.distbits},aa=x(2,c.lens,c.nlen,
-c.ndist,c.distcode,0,c.work,ba),c.distbits=ba.bits,aa){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=C;c.bits=G;y(d,R);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;m=d.avail_in;C=c.hold;G=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;T=c.lencode[C&(1<<c.lenbits)-1],N=T>>>24,P=T>>>16&255,Q=65535&T,!(N<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(P&&
+c.ndist,c.distcode,0,c.work,ba),c.distbits=ba.bits,aa){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<=E){d.next_out=l;d.avail_out=E;d.next_in=k;d.avail_in=m;c.hold=C;c.bits=G;y(d,R);l=d.next_out;g=d.output;E=d.avail_out;k=d.next_in;f=d.input;m=d.avail_in;C=c.hold;G=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;T=c.lencode[C&(1<<c.lenbits)-1],N=T>>>24,P=T>>>16&255,Q=65535&T,!(N<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(P&&
0===(240&P)){X=N;da=P;for(ea=Q;T=c.lencode[ea+((C&(1<<X+da)-1)>>X)],N=T>>>24,P=T>>>16&255,Q=65535&T,!(X+N<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=X;G-=X;c.back+=X}if(C>>>=N,G-=N,c.back+=N,c.length=Q,0===P){c.mode=26;break}if(32&P){c.back=-1;c.mode=12;break}if(64&P){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&P;c.mode=22;case 22:if(c.extra){for(P=c.extra;G<P;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}c.length+=C&(1<<c.extra)-1;C>>>=c.extra;G-=c.extra;c.back+=c.extra}c.was=
c.length;c.mode=23;case 23:for(;T=c.distcode[C&(1<<c.distbits)-1],N=T>>>24,P=T>>>16&255,Q=65535&T,!(N<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(0===(240&P)){X=N;da=P;for(ea=Q;T=c.distcode[ea+((C&(1<<X+da)-1)>>X)],N=T>>>24,P=T>>>16&255,Q=65535&T,!(X+N<=G);){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}C>>>=X;G-=X;c.back+=X}if(C>>>=N,G-=N,c.back+=N,64&P){d.msg="invalid distance code";c.mode=30;break}c.offset=Q;c.extra=15&P;c.mode=24;case 24:if(c.extra){for(P=c.extra;G<P;){if(0===m)break a;m--;C+=f[k++]<<
-G;G+=8}c.offset+=C&(1<<c.extra)-1;C>>>=c.extra;G-=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(F=R-D,c.offset>F){if(F=c.offset-F,F>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}F>c.wnext?(F-=c.wnext,Z=c.wsize-F):Z=c.wnext-F;F>c.length&&(F=c.length);P=c.window}else P=g,Z=l-c.offset,F=c.length;F>D&&(F=D);D-=F;c.length-=F;do g[l++]=P[Z++];while(--F);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>G;){if(0===m)break a;m--;C|=f[k++]<<G;G+=8}if(R-=D,d.total_out+=R,c.total+=R,R&&(d.adler=c.check=c.flags?v(c.check,g,R,l-R):t(c.check,g,R,l-R)),R=D,(c.flags?C:b(C))!==c.check){d.msg="incorrect data check";c.mode=30;break}G=C=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(C!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=30;break}G=C=0}c.mode=29;case 29:aa=1;break a;
-case 30:aa=-3;break a;case 31:return-4;default:return B}return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=m,c.hold=C,c.bits=G,(c.wsize||R!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&n(d,d.output,d.next_out,R-d.avail_out)?(c.mode=31,-4):(K-=d.avail_in,R-=d.avail_out,d.total_in+=K,d.total_out+=R,c.total+=R,c.wrap&&R&&(d.adler=c.check=c.flags?v(c.check,g,R,d.next_out-R):t(c.check,g,R,d.next_out-R)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:0)+(20===c.mode||15===c.mode?256:0),(0===K&&
+G;G+=8}c.offset+=C&(1<<c.extra)-1;C>>>=c.extra;G-=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===E)break a;if(F=R-E,c.offset>F){if(F=c.offset-F,F>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}F>c.wnext?(F-=c.wnext,Z=c.wsize-F):Z=c.wnext-F;F>c.length&&(F=c.length);P=c.window}else P=g,Z=l-c.offset,F=c.length;F>E&&(F=E);E-=F;c.length-=F;do g[l++]=P[Z++];while(--F);0===c.length&&(c.mode=21);break;case 26:if(0===
+E)break a;g[l++]=c.length;E--;c.mode=21;break;case 27:if(c.wrap){for(;32>G;){if(0===m)break a;m--;C|=f[k++]<<G;G+=8}if(R-=E,d.total_out+=R,c.total+=R,R&&(d.adler=c.check=c.flags?v(c.check,g,R,l-R):t(c.check,g,R,l-R)),R=E,(c.flags?C:b(C))!==c.check){d.msg="incorrect data check";c.mode=30;break}G=C=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>G;){if(0===m)break a;m--;C+=f[k++]<<G;G+=8}if(C!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=30;break}G=C=0}c.mode=29;case 29:aa=1;break a;
+case 30:aa=-3;break a;case 31:return-4;default:return B}return d.next_out=l,d.avail_out=E,d.next_in=k,d.avail_in=m,c.hold=C,c.bits=G,(c.wsize||R!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&n(d,d.output,d.next_out,R-d.avail_out)?(c.mode=31,-4):(K-=d.avail_in,R-=d.avail_out,d.total_in+=K,d.total_out+=R,c.total+=R,c.wrap&&R&&(d.adler=c.check=c.flags?v(c.check,g,R,d.next_out-R):t(c.check,g,R,d.next_out-R)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:0)+(20===c.mode||15===c.mode?256:0),(0===K&&
0===R||4===e)&&aa===A&&(aa=-5),aa)};d.inflateEnd=function(b){if(!b||!b.state)return B;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)?B:(e.head=d,d.done=!1,A)):B};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?B:11===e.mode&&(c=1,c=t(c,d,f,0),c!==e.check)?-3:n(b,d,f,f)?(e.mode=31,-4):(e.havedict=1,A)):B};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,q,u,t,v,y){var m,n,p,z,C,F,E,D,K=y.bits,H,J,I,L,M,U,V=0,O,G=null,W=0,R=new b.Buf16(16);z=new b.Buf16(16);var ca=null,Z=0;for(H=0;15>=H;H++)R[H]=0;for(J=0;J<q;J++)R[c[f+J]]++;L=K;for(I=15;1<=I&&0===R[I];I--);if(L>I&&(L=I),0===I)return u[t++]=20971520,u[t++]=20971520,y.bits=1,0;for(K=1;K<I&&0===R[K];K++);L<K&&(L=K);for(H=m=1;15>=H;H++)if(m<<=1,m-=R[H],0>m)return-1;if(0<m&&(0===d||1!==I))return-1;z[1]=0;for(H=1;15>H;H++)z[H+1]=z[H]+R[H];for(J=
-0;J<q;J++)0!==c[f+J]&&(v[z[c[f+J]]++]=J);if(0===d?(G=ca=v,C=19):1===d?(G=e,W-=257,ca=g,Z-=257,C=256):(G=k,ca=l,C=-1),O=0,J=0,H=K,z=t,M=L,U=0,p=-1,V=1<<L,q=V-1,1===d&&852<V||2===d&&592<V)return 1;for(var P=0;;){P++;F=H-U;v[J]<C?(E=0,D=v[J]):v[J]>C?(E=ca[Z+v[J]],D=G[W+v[J]]):(E=96,D=0);m=1<<H-U;K=n=1<<M;do n-=m,u[z+(O>>U)+n]=F<<24|E<<16|D|0;while(0!==n);for(m=1<<H-1;O&m;)m>>=1;if(0!==m?(O&=m-1,O+=m):O=0,J++,0===--R[H]){if(H===I)break;H=c[f+v[J]]}if(H>L&&(O&q)!==p){0===U&&(U=L);z+=K;M=H-U;for(m=1<<M;M+
+25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,q,u,t,v,y){var m,n,p,z,C,F,D,E,K=y.bits,H,J,I,L,M,U,V=0,O,G=null,W=0,R=new b.Buf16(16);z=new b.Buf16(16);var ca=null,Z=0;for(H=0;15>=H;H++)R[H]=0;for(J=0;J<q;J++)R[c[f+J]]++;L=K;for(I=15;1<=I&&0===R[I];I--);if(L>I&&(L=I),0===I)return u[t++]=20971520,u[t++]=20971520,y.bits=1,0;for(K=1;K<I&&0===R[K];K++);L<K&&(L=K);for(H=m=1;15>=H;H++)if(m<<=1,m-=R[H],0>m)return-1;if(0<m&&(0===d||1!==I))return-1;z[1]=0;for(H=1;15>H;H++)z[H+1]=z[H]+R[H];for(J=
+0;J<q;J++)0!==c[f+J]&&(v[z[c[f+J]]++]=J);if(0===d?(G=ca=v,C=19):1===d?(G=e,W-=257,ca=g,Z-=257,C=256):(G=k,ca=l,C=-1),O=0,J=0,H=K,z=t,M=L,U=0,p=-1,V=1<<L,q=V-1,1===d&&852<V||2===d&&592<V)return 1;for(var P=0;;){P++;F=H-U;v[J]<C?(D=0,E=v[J]):v[J]>C?(D=ca[Z+v[J]],E=G[W+v[J]]):(D=96,E=0);m=1<<H-U;K=n=1<<M;do n-=m,u[z+(O>>U)+n]=F<<24|D<<16|E|0;while(0!==n);for(m=1<<H-1;O&m;)m>>=1;if(0!==m?(O&=m-1,O+=m):O=0,J++,0===--R[H]){if(H===I)break;H=c[f+v[J]]}if(H>L&&(O&q)!==p){0===U&&(U=L);z+=K;M=H-U;for(m=1<<M;M+
U<I&&(m-=R[M+U],!(0>=m));)M++,m<<=1;if(V+=1<<M,1===d&&852<V||2===d&&592<V)return 1;p=O&q;u[p]=L<<24|M<<16|z-t|0}}return 0!==O&&(u[z+O]=H-U<<24|4194304),y.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>V-e?(b.bi_buf|=d<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=d>>V-b.bi_valid,b.bi_valid+=e-V):(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 q(b){var d;for(d=0;d<J;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 u(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 t(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 v(b,d,e){for(var c=b.heap[e],f=e<<1;f<=b.heap_len&&(f<b.heap_len&&t(d,b.heap[f+1],b.heap[f],b.depth)&&f++,!t(d,c,b.heap[f],b.depth));)b.heap[e]=b.heap[f],e=f,f<<=1;b.heap[e]=c}function y(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=ea[f],m(b,g+H+1,d),k=ca[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=Z[g],0!==k&&(c-=aa[g],
l(b,c,k)));while(n<b.last_lit)}m(b,O,d)}function x(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=M;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--)v(b,g,e);f=l;do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],v(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++,v(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,t,k=d.dyn_tree,l=d.max_code,q=d.stat_desc.static_tree,u=d.stat_desc.has_stree,y=d.stat_desc.extra_bits,x=d.stat_desc.extra_base,z=d.stat_desc.max_length,A=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<M;e++)f=b.heap[e],c=k[2*k[2*f+1]+1]+1,c>z&&(c=z,A++),k[2*
-f+1]=c,f>l||(b.bl_count[c]++,n=0,f>=x&&(n=y[f-x]),t=k[2*f],b.opt_len+=t*(c+n),u&&(b.static_len+=t*(q[2*f+1]+n)));if(0!==A){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]--;A-=2}while(0<A);for(c=z;0!==c;c--)for(f=b.bl_count[c];0!==f;)n=b.heap[--e],n>l||(k[2*n+1]!==c&&(b.opt_len+=(c-k[2*n+1])*k[2*n],k[2*n+1]=c),f--)}p(g,m,b.bl_count)}function A(b,d,e){var c,f,g=-1,k=d[1],l=0,m=7,n=4;0===k&&(m=138,n=3);d[2*(e+1)+1]=65535;for(c=0;c<=e;c++)f=k,k=d[2*(c+1)+1],++l<m&&
+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++,v(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,t,k=d.dyn_tree,l=d.max_code,q=d.stat_desc.static_tree,u=d.stat_desc.has_stree,y=d.stat_desc.extra_bits,x=d.stat_desc.extra_base,A=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<M;e++)f=b.heap[e],c=k[2*k[2*f+1]+1]+1,c>A&&(c=A,z++),k[2*
+f+1]=c,f>l||(b.bl_count[c]++,n=0,f>=x&&(n=y[f-x]),t=k[2*f],b.opt_len+=t*(c+n),u&&(b.static_len+=t*(q[2*f+1]+n)));if(0!==z){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]--;z-=2}while(0<z);for(c=A;0!==c;c--)for(f=b.bl_count[c];0!==f;)n=b.heap[--e],n>l||(k[2*n+1]!==c&&(b.opt_len+=(c-k[2*n+1])*k[2*n],k[2*n+1]=c),f--)}p(g,m,b.bl_count)}function A(b,d,e){var c,f,g=-1,k=d[1],l=0,m=7,n=4;0===k&&(m=138,n=3);d[2*(e+1)+1]=65535;for(c=0;c<=e;c++)f=k,k=d[2*(c+1)+1],++l<m&&
f===k||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*G]++):10>=l?b.bl_tree[2*W]++:b.bl_tree[2*R]++,l=0,g=f,0===k?(m=138,n=3):f===k?(m=6,n=3):(m=7,n=4))}function B(b,d,e){var c,f,g=-1,k=d[1],n=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],!(++n<p&&f===k)){if(n<t){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==g&&(m(b,f,b.bl_tree),n--),m(b,G,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,W,b.bl_tree),l(b,n-3,3)):(m(b,R,b.bl_tree),l(b,n-11,7));n=0;g=f;0===k?(p=138,t=
-3):f===k?(p=6,t=3):(p=7,t=4)}}function z(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return D;for(d=32;d<H;d++)if(0!==b.dyn_ltree[2*d])return D;return E}function C(b,d,e,c){l(b,(K<<1)+(c?1:0),3);u(b);k(b,e);k(b,~e);F.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var F=c("../utils/common"),E=0,D=1,K=0,H=256,J=H+1+29,I=30,L=19,M=2*J+1,U=15,V=16,O=256,G=16,W=17,R=18,ca=[0,0,0,0,0,0,
+3):f===k?(p=6,t=3):(p=7,t=4)}}function z(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return D;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return E;for(d=32;d<H;d++)if(0!==b.dyn_ltree[2*d])return E;return D}function C(b,d,e,c){l(b,(K<<1)+(c?1:0),3);u(b);k(b,e);k(b,~e);F.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var F=c("../utils/common"),D=0,E=1,K=0,H=256,J=H+1+29,I=30,L=19,M=2*J+1,U=15,V=16,O=256,G=16,W=17,R=18,ca=[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],Z=[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],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Q=Array(2*(J+2));b(Q);var X=Array(2*I);b(X);var da=Array(512);b(da);var ea=Array(256);b(ea);var S=Array(29);b(S);var aa=Array(I);b(aa);var ba,T,Y,ha=!1;d._tr_init=function(b){if(!ha){var d,c,f,k=Array(U+1);for(f=c=0;28>f;f++)for(S[f]=c,d=0;d<1<<ca[f];d++)ea[c++]=f;ea[c-1]=f;for(f=c=0;16>f;f++)for(aa[f]=
c,d=0;d<1<<Z[f];d++)da[c++]=f;for(c>>=7;f<I;f++)for(aa[f]=c<<7,d=0;d<1<<Z[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,J+1,k);for(d=0;d<I;d++)X[2*d+1]=5,X[2*d]=n(d,5);ba=new e(Q,ca,H+1,J,U);T=new e(X,Z,0,I,U);Y=new e([],P,0,L,7);ha=!0}b.l_desc=new g(b.dyn_ltree,ba);b.d_desc=new g(b.dyn_dtree,T);b.bl_desc=new g(b.bl_tree,Y);b.bi_buf=0;b.bi_valid=0;q(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=z(b));x(b,b.l_desc);x(b,b.d_desc);A(b,b.dyn_ltree,b.l_desc.max_code);A(b,b.dyn_dtree,b.d_desc.max_code);x(b,b.bl_desc);for(k=L-1;3<=k&&0===b.bl_tree[2*N[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),y(b,Q,X);else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+
@@ -577,10 +577,10 @@ mxVmlCanvas2D.prototype.plainText=function(a,c,f,d,b,e,g,k,l,m,n,p,q){k=this.sta
g==mxConstants.ALIGN_BOTTOM?e=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(e=k/2);null!=p&&(f.style.rotation=p,g=Math.PI/180*p,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=function(b){b+=this.graph.panDy;var d=!1;Math.abs(b-E)<x?(l=b-a.getCenterY(),x=Math.abs(b-E),d=!0):Math.abs(b-C)<x?(l=b-a.y,x=Math.abs(b-C),d=!0):Math.abs(b-F)<x&&(l=b-a.y-a.height,x=Math.abs(b-F),d=!0);d&&(u=D,t=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:
+mxGuide.prototype.move=function(a,c,f){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=c){var d=function(b){b+=this.graph.panDy;var d=!1;Math.abs(b-D)<x?(l=b-a.getCenterY(),x=Math.abs(b-D),d=!0):Math.abs(b-C)<x?(l=b-a.y,x=Math.abs(b-C),d=!0):Math.abs(b-F)<x&&(l=b-a.y-a.height,x=Math.abs(b-F),d=!0);d&&(u=E,t=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())));q=q||d},b=function(b,d){b+=this.graph.panDx;var e=!1;Math.abs(b-z)<y?(k=b-a.getCenterX(),y=Math.abs(b-z),e=!0):Math.abs(b-A)<y?(k=b-a.x,y=Math.abs(b-A),e=!0):Math.abs(b-B)<y&&(k=b-a.x-a.width,y=Math.abs(b-B),e=!0);e&&(n=d,p=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())));m=m||e},e=this.graph.getView().translate,g=this.graph.getView().scale,k=c.x,l=c.y,m=!1,n=null,p=null,q=!1,u=null,t=null,v=this.getGuideTolerance(),y=v,x=v,v=a.clone();v.x+=c.x;v.y+=c.y;var A=v.x,B=v.x+v.width,z=v.getCenterX(),C=v.y,F=v.y+v.height,E=v.getCenterY();for(c=0;c<this.states.length;c++){var D=this.states[c];null!=D&&(this.horizontal&&(b.call(this,D.getCenterX(),D),b.call(this,D.x,
-D),b.call(this,D.x+D.width,D)),this.vertical&&(d.call(this,D.getCenterY(),D),d.call(this,D.y,D),d.call(this,D.y+D.height,D)))}f&&(m||(f=a.x-(this.graph.snap(a.x/g-e.x)+e.x)*g,k=this.graph.snap(k/g)*g-f),q||(e=a.y-(this.graph.snap(a.y/g-e.y)+e.y)*g,l=this.graph.snap(l/g)*g-e));g=this.graph.container;m||null==this.guideX?null!=this.guideX&&(null!=n&&null!=a&&(minY=Math.min(a.y+l-this.graph.panDy,n.y),maxY=Math.max(a.y+a.height+l-this.graph.panDy,n.y+n.height)),this.guideX.points=null!=minY&&null!=maxY?
+mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));m=m||e},e=this.graph.getView().translate,g=this.graph.getView().scale,k=c.x,l=c.y,m=!1,n=null,p=null,q=!1,u=null,t=null,v=this.getGuideTolerance(),y=v,x=v,v=a.clone();v.x+=c.x;v.y+=c.y;var A=v.x,B=v.x+v.width,z=v.getCenterX(),C=v.y,F=v.y+v.height,D=v.getCenterY();for(c=0;c<this.states.length;c++){var E=this.states[c];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&&(d.call(this,E.getCenterY(),E),d.call(this,E.y,E),d.call(this,E.y+E.height,E)))}f&&(m||(f=a.x-(this.graph.snap(a.x/g-e.x)+e.x)*g,k=this.graph.snap(k/g)*g-f),q||(e=a.y-(this.graph.snap(a.y/g-e.y)+e.y)*g,l=this.graph.snap(l/g)*g-e));g=this.graph.container;m||null==this.guideX?null!=this.guideX&&(null!=n&&null!=a&&(minY=Math.min(a.y+l-this.graph.panDy,n.y),maxY=Math.max(a.y+a.height+l-this.graph.panDy,n.y+n.height)),this.guideX.points=null!=minY&&null!=maxY?
[new mxPoint(p,minY),new mxPoint(p,maxY)]:[new mxPoint(p,-this.graph.panDy),new mxPoint(p,g.scrollHeight-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(n,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden";q||null==this.guideY?null!=this.guideY&&(null!=u&&null!=a&&(minX=Math.min(a.x+k-this.graph.panDx,u.x),maxX=Math.max(a.x+a.width+k-this.graph.panDx,u.x+u.width)),this.guideY.points=null!=minX&&null!=maxX?[new mxPoint(minX,t),
new mxPoint(maxX,t)]:[new mxPoint(-this.graph.panDx,t),new mxPoint(g.scrollWidth-3-this.graph.panDx,t)],this.guideY.stroke=this.getGuideColor(u,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw()):this.guideY.node.style.visibility="hidden";c=new mxPoint(k,l)}return c};mxGuide.prototype.getGuideColor=function(a,c){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
mxGuide.prototype.setVisible=function(a){null!=this.guideX&&(this.guideX.node.style.visibility=a?"visible":"hidden");null!=this.guideY&&(this.guideY.node.style.visibility=a?"visible":"hidden")};mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null);null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)};function mxStencil(a){this.desc=a;this.parseDescription();this.parseConstraints()}mxStencil.defaultLocalized=!1;mxStencil.allowEval=!1;
@@ -662,9 +662,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(),q=c[c.length-1],u=1;u<c.length-1&&c[u].x==
-c[0].x&&c[u].y==c[0].y;)u++;var t=c[u].x-c[0].x,u=c[u].y-c[0].y,v=Math.sqrt(t*t+u*u);if(0!=v){var y=t/v,x,A=y,B=u/v,z,C=B,v=e*B,F=-e*y,E=[];p?a.setLineJoin("round"):2<c.length&&a.setMiterLimit(1.42);a.begin();t=y;u=B;if(k&&!g)this.paintMarker(a,c[0].x,c[0].y,y,B,n,d,e,m,!0);else{x=c[0].x+v/2+m*y;z=c[0].y+F/2+m*B;var D=c[0].x-v/2+m*y,K=c[0].y-F/2+m*B;g?(a.moveTo(x,z),E.push(function(){a.lineTo(D,K)})):(a.moveTo(D,K),a.lineTo(x,z))}for(var H=z=x=0,v=0;v<c.length-2;v++)if(F=mxUtils.relativeCcw(c[v].x,
-c[v].y,c[v+1].x,c[v+1].y,c[v+2].x,c[v+2].y),x=c[v+2].x-c[v+1].x,z=c[v+2].y-c[v+1].y,H=Math.sqrt(x*x+z*z),0!=H&&(A=x/H,C=z/H,tmp=Math.max(Math.sqrt((y*A+B*C+1)/2),.04),x=y+A,z=B+C,H=Math.sqrt(x*x+z*z),0!=H)){x/=H;z/=H;var H=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),H=0!=F&&p?Math.max(.1,H):Math.max(tmp,.06),J=c[v+1].x+z*e/2/H,I=c[v+1].y-x*e/2/H;z=c[v+1].x-z*e/2/H;x=c[v+1].y+x*e/2/H;0!=F&&p?-1==F?(F=z+C*e,H=x-A*e,a.lineTo(z+B*e,x-y*e),a.quadTo(J,I,F,H),function(b,d){E.push(function(){a.lineTo(b,
-d)})}(z,x)):(a.lineTo(J,I),function(b,d){var c=J-B*e,f=I+y*e,g=J-C*e,k=I+A*e;E.push(function(){a.quadTo(b,d,c,f)});E.push(function(){a.lineTo(g,k)})}(z,x)):(a.lineTo(J,I),function(b,d){E.push(function(){a.lineTo(b,d)})}(z,x));y=A;B=C}v=e*C;F=-e*A;if(l&&!g)this.paintMarker(a,q.x,q.y,-y,-B,f,b,e,m,!1);else{a.lineTo(q.x-m*A+v/2,q.y-m*C+F/2);var L=q.x-m*A-v/2,M=q.y-m*C-F/2;g?(a.moveTo(L,M),E.splice(0,0,function(){a.moveTo(L,M)})):a.lineTo(L,M)}for(v=E.length-1;0<=v;v--)E[v]();g?(a.end(),a.stroke()):(a.close(),
+c[0].x&&c[u].y==c[0].y;)u++;var t=c[u].x-c[0].x,u=c[u].y-c[0].y,v=Math.sqrt(t*t+u*u);if(0!=v){var y=t/v,x,A=y,B=u/v,z,C=B,v=e*B,F=-e*y,D=[];p?a.setLineJoin("round"):2<c.length&&a.setMiterLimit(1.42);a.begin();t=y;u=B;if(k&&!g)this.paintMarker(a,c[0].x,c[0].y,y,B,n,d,e,m,!0);else{x=c[0].x+v/2+m*y;z=c[0].y+F/2+m*B;var E=c[0].x-v/2+m*y,K=c[0].y-F/2+m*B;g?(a.moveTo(x,z),D.push(function(){a.lineTo(E,K)})):(a.moveTo(E,K),a.lineTo(x,z))}for(var H=z=x=0,v=0;v<c.length-2;v++)if(F=mxUtils.relativeCcw(c[v].x,
+c[v].y,c[v+1].x,c[v+1].y,c[v+2].x,c[v+2].y),x=c[v+2].x-c[v+1].x,z=c[v+2].y-c[v+1].y,H=Math.sqrt(x*x+z*z),0!=H&&(A=x/H,C=z/H,tmp=Math.max(Math.sqrt((y*A+B*C+1)/2),.04),x=y+A,z=B+C,H=Math.sqrt(x*x+z*z),0!=H)){x/=H;z/=H;var H=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),H=0!=F&&p?Math.max(.1,H):Math.max(tmp,.06),J=c[v+1].x+z*e/2/H,I=c[v+1].y-x*e/2/H;z=c[v+1].x-z*e/2/H;x=c[v+1].y+x*e/2/H;0!=F&&p?-1==F?(F=z+C*e,H=x-A*e,a.lineTo(z+B*e,x-y*e),a.quadTo(J,I,F,H),function(b,d){D.push(function(){a.lineTo(b,
+d)})}(z,x)):(a.lineTo(J,I),function(b,d){var c=J-B*e,f=I+y*e,g=J-C*e,k=I+A*e;D.push(function(){a.quadTo(b,d,c,f)});D.push(function(){a.lineTo(g,k)})}(z,x)):(a.lineTo(J,I),function(b,d){D.push(function(){a.lineTo(b,d)})}(z,x));y=A;B=C}v=e*C;F=-e*A;if(l&&!g)this.paintMarker(a,q.x,q.y,-y,-B,f,b,e,m,!1);else{a.lineTo(q.x-m*A+v/2,q.y-m*C+F/2);var L=q.x-m*A-v/2,M=q.y-m*C-F/2;g?(a.moveTo(L,M),D.splice(0,0,function(){a.moveTo(L,M)})):a.lineTo(L,M)}for(v=D.length-1;0<=v;v--)D[v]();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,t,u,n,d,e,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,q.x,q.y,-y,-B,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};
@@ -1026,7 +1026,7 @@ g.writeln(k);mxClient.IS_VML?g.writeln('<html xmlns:v="urn:schemas-microsoft-com
p.y*this.scale,l.width+=l.x,l.height+=l.y,l.x=0,this.border=l.y=0);var q=this.pageFormat.width-2*this.border,u=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;l.width/=n;l.height/=n;var t=Math.max(1,Math.ceil((l.width+this.x0)/q)),v=Math.max(1,Math.ceil((l.height+this.y0)/u));this.pageCount=t*v;var y=mxUtils.bind(this,function(){if(this.pageSelector&&(1<v||1<t)){var b=this.createPageSelector(v,t);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()})}}}),x=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 B=0;B<A.length;B++)x(A[B],!0);for(var z=this.getAppendices(this.pageFormat.width,this.pageFormat.height),B=0;B<v;B++){var C=B*u/this.scale-this.y0/this.scale+(l.y-p.y*m)/m;for(a=0;a<t;a++){if(null==this.wnd)return null;
-var F=a*q/this.scale-this.x0/this.scale+(l.x-p.x*m)/m,E=B*t+a+1,D=new mxRectangle(F,C,q,u),e=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(b){this.addGraphFragment(-F,-C,this.scale,E,b,D);this.printBackgroundImage&&this.insertBackgroundImage(b,-F,-C)}),E);e.setAttribute("id","mxPage-"+E);x(e,null!=z||B<v-1||a<t-1)}}if(null!=z)for(B=0;B<z.length;B++)x(z[B],B<z.length-1);c&&!d&&(this.closeDocument(),y());this.wnd.focus()}catch(K){null!=e&&null!=e.parentNode&&
+var F=a*q/this.scale-this.x0/this.scale+(l.x-p.x*m)/m,D=B*t+a+1,E=new mxRectangle(F,C,q,u),e=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(b){this.addGraphFragment(-F,-C,this.scale,D,b,E);this.printBackgroundImage&&this.insertBackgroundImage(b,-F,-C)}),D);e.setAttribute("id","mxPage-"+D);x(e,null!=z||B<v-1||a<t-1)}}if(null!=z)for(B=0;B<z.length;B++)x(z[B],B<z.length-1);c&&!d&&(this.closeDocument(),y());this.wnd.focus()}catch(K){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("</body>");a.writeln("</html>");a.close();mxEvent.release(a.body)}};
mxPrintPreview.prototype.writeHead=function(a,c){null!=this.title&&a.writeln("<title>"+this.title+"</title>");mxClient.IS_VML&&a.writeln('<style type="text/css">v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}</style>');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('<style type="text/css">');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("</style>")};mxPrintPreview.prototype.writePostfix=function(a){};
@@ -2046,7 +2046,7 @@ mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){d.popupMenuHa
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("=");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 B=["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),C=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],B,["align"],["html"]];for(a=0;a<C.length;a++)for(c=0;c<C[a].length;c++)x.push(C[a][c]);for(a=0;a<A.length;a++)x.push(A[a]);var F=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=x.slice(),f=0;f<m.length;f++){var p=m[f],t=p.indexOf("=");if(0<=t){var q=p.substring(0,t),u=mxUtils.indexOf(n,q);0<=u&&n.splice(u,1);for(var v=0;v<C.length;v++){var y=C[v];if(0<=mxUtils.indexOf(y,q))for(var z=
-0;z<y.length;z++){var B=mxUtils.indexOf(n,y[z]);0<=B&&n.splice(B,1)}}}}c=(e=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var q=n[f],D=c[q];null==D||"shape"==q&&!e||(!e||0>mxUtils.indexOf(A,q))&&d.setCellStyles(q,D,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(b,a){F(a.getProperty("cells"))});d.addListener("textInserted",function(b,a){F(a.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(b,
+0;z<y.length;z++){var B=mxUtils.indexOf(n,y[z]);0<=B&&n.splice(B,1)}}}}c=(e=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var q=n[f],E=c[q];null==E||"shape"==q&&!e||(!e||0>mxUtils.indexOf(A,q))&&d.setCellStyles(q,E,[k])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(b,a){F(a.getProperty("cells"))});d.addListener("textInserted",function(b,a){F(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"));F(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(B,e[g]);if("strokeColor"!=e[g]||null!=k[g]&&"none"!=k[g])if(0<=
mxUtils.indexOf(A,e[g]))f||0<=mxUtils.indexOf(z,e[g])?null==k[g]?delete d.currentEdgeStyle[e[g]]:d.currentEdgeStyle[e[g]]=k[g]:c&&0<=mxUtils.indexOf(x,e[g])&&(null==k[g]?delete d.currentVertexStyle[e[g]]:d.currentVertexStyle[e[g]]=k[g]);else if(0<=mxUtils.indexOf(x,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(z,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"==
@@ -2307,27 +2307,27 @@ d.width,d.y),!1)):f==mxConstants.DIRECTION_SOUTH?(d.height=e,d.y=k.y+k.height,d.
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;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==E?30:20));return d}for(var k=this.editorUi,l=k.editor.graph,m=null,n=null,p=this,q=0;q<d.length&&(null==n&&this.editorUi.editor.graph.model.isVertex(d[q])?
-n=q:null==m&&this.editorUi.editor.graph.model.isEdge(d[q])&&null==this.editorUi.editor.graph.model.getTerminal(d[q],!0)&&(m=q),null==n||null==m);q++);var u=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!=x&&I==E){var k=b.isCellSelected(x.cell)?b.getSelectionCells():[x.cell],k=this.updateShapes(b.model.isEdge(x.cell)?d[0]:d[n],k);b.setSelectionCells(k)}else null!=d&&null!=I&&null!=
-v&&I!=E?(k=b.model.isEdge(v.cell)||null==m?n:m,this.dropAndConnect(v.cell,d,J,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){u.isActive()&&u.reset()});var t=u.mouseDown;u.mouseDown=function(b){mxEvent.isPopupTrigger(b)||mxEvent.isMultiTouchEvent(b)||(l.stopEditing(),t.apply(this,arguments))};var v=
-null,y=null,x=null,A=!1,B=e(this.triangleUp,mxResources.get("connect")),z=e(this.triangleRight,mxResources.get("connect")),C=e(this.triangleDown,mxResources.get("connect")),F=e(this.triangleLeft,mxResources.get("connect")),E=e(this.refreshTarget,mxResources.get("replace")),D=null,K=e(this.roundDrop),H=e(this.roundDrop),J=mxConstants.DIRECTION_NORTH,I=null,L=u.createPreviewElement;u.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 M=u.dragEnter;u.dragEnter=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("none");M.apply(this,arguments)};var U=u.dragExit;u.dragExit=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("");U.apply(this,arguments)};u.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!=x&&I==E)this.previewElement.style.display=
+"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==D?30:20));return d}for(var k=this.editorUi,l=k.editor.graph,m=null,n=null,p=this,q=0;q<d.length&&(null==n&&this.editorUi.editor.graph.model.isVertex(d[q])?
+n=q:null==m&&this.editorUi.editor.graph.model.isEdge(d[q])&&null==this.editorUi.editor.graph.model.getTerminal(d[q],!0)&&(m=q),null==n||null==m);q++);var u=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!=x&&I==D){var k=b.isCellSelected(x.cell)?b.getSelectionCells():[x.cell],k=this.updateShapes(b.model.isEdge(x.cell)?d[0]:d[n],k);b.setSelectionCells(k)}else null!=d&&null!=I&&null!=
+v&&I!=D?(k=b.model.isEdge(v.cell)||null==m?n:m,this.dropAndConnect(v.cell,d,J,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){u.isActive()&&u.reset()});var t=u.mouseDown;u.mouseDown=function(b){mxEvent.isPopupTrigger(b)||mxEvent.isMultiTouchEvent(b)||(l.stopEditing(),t.apply(this,arguments))};var v=
+null,y=null,x=null,A=!1,B=e(this.triangleUp,mxResources.get("connect")),z=e(this.triangleRight,mxResources.get("connect")),C=e(this.triangleDown,mxResources.get("connect")),F=e(this.triangleLeft,mxResources.get("connect")),D=e(this.refreshTarget,mxResources.get("replace")),E=null,K=e(this.roundDrop),H=e(this.roundDrop),J=mxConstants.DIRECTION_NORTH,I=null,L=u.createPreviewElement;u.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 M=u.dragEnter;u.dragEnter=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("none");M.apply(this,arguments)};var U=u.dragExit;u.dragExit=function(b,a){null!=k.hoverIcons&&k.hoverIcons.setDisplay("");U.apply(this,arguments)};u.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!=x&&I==D)this.previewElement.style.display=
a.model.isEdge(x.cell)?"none":"",this.previewElement.style.left=x.x+"px",this.previewElement.style.top=x.y+"px",this.previewElement.style.width=x.width+"px",this.previewElement.style.height=x.height+"px";else if(null!=v&&null!=I){var f=a.model.isEdge(v.cell)||null==m?n:m,g=p.getDropAndConnectGeometry(v.cell,d[f],J,d),k=a.model.isEdge(v.cell)?null:a.getCellGeometry(v.cell),l=a.getCellGeometry(d[f]),t=a.model.getParent(v.cell),q=c.translate.x*c.scale,y=c.translate.y*c.scale;null!=k&&!k.relative&&a.model.isVertex(t)&&
(y=c.getState(t),q=y.x,y=y.y);k=l.x;l=l.y;a.model.isEdge(d[f])&&(l=k=0);this.previewElement.style.left=(g.x-k)*c.scale+q+"px";this.previewElement.style.top=(g.y-l)*c.scale+y+"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!=u.currentHighlight.state&&a.model.isEdge(u.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 V=(new Date).getTime(),O=0,G=null,W=this.editorUi.editor.graph.getCellStyle(d[0]);u.getDropTarget=mxUtils.bind(this,function(b,a,e,c){var f=mxEvent.isAltDown(c)||null==d?null:b.getCellAt(a,e);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;G!=l?(G=l,V=(new Date).getTime(),O=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=l&&(this.updateThread=window.setTimeout(function(){null==I&&(G=l,u.getDropTarget(b,a,e,c))},this.dropTargetDelay+10))):O=(new Date).getTime()-V;if(2500>O&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=
mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(W,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]))){x=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);E.style.left=Math.floor(m.x)+"px";E.style.top=Math.floor(m.y)+"px";null==D&&(b.container.appendChild(E),D=E.parentNode);g(a,e,m,E)}else null==x||!mxUtils.contains(x,a,e)||1500<O&&!mxEvent.isShiftDown(c)?(x=null,null!=D&&(E.parentNode.removeChild(E),D=null)):null!=x&&null!=D&&(m=b.model.isEdge(x.cell)?b.view.getPoint(x):new mxPoint(x.getCenterX(),x.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,E));if(A&&null!=v&&!mxEvent.isAltDown(c)&&null==I){k=mxRectangle.fromRectangle(v);if(b.model.isEdge(v.cell)){var p=v.absolutePoints;null!=K.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),K)));null!=H.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),H)))}else m=
+2,this.refreshTarget.width,this.refreshTarget.height);D.style.left=Math.floor(m.x)+"px";D.style.top=Math.floor(m.y)+"px";null==E&&(b.container.appendChild(D),E=D.parentNode);g(a,e,m,D)}else null==x||!mxUtils.contains(x,a,e)||1500<O&&!mxEvent.isShiftDown(c)?(x=null,null!=E&&(D.parentNode.removeChild(D),E=null)):null!=x&&null!=E&&(m=b.model.isEdge(x.cell)?b.view.getPoint(x):new mxPoint(x.getCenterX(),x.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,D));if(A&&null!=v&&!mxEvent.isAltDown(c)&&null==I){k=mxRectangle.fromRectangle(v);if(b.model.isEdge(v.cell)){var p=v.absolutePoints;null!=K.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),K)));null!=H.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),H)))}else m=
mxRectangle.fromRectangle(v),null!=v.shape&&null!=v.shape.boundingBox&&(m=mxRectangle.fromRectangle(v.shape.boundingBox)),m.grow(this.graph.tolerance),m.grow(HoverIcons.prototype.arrowSpacing),p=this.graph.selectionCellsHandler.getHandler(v.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(v.getCenterX()-this.triangleUp.width/2,m.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),B)),k.add(g(a,e,new mxRectangle(m.x+m.width,v.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),z)),k.add(g(a,e,new mxRectangle(v.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,v.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),F));null!=k&&k.grow(10)}J=mxConstants.DIRECTION_NORTH;I==z?J=mxConstants.DIRECTION_EAST:I==C||I==H?J=mxConstants.DIRECTION_SOUTH:I==F&&(J=mxConstants.DIRECTION_WEST);null!=x&&I==E&&(l=x);m=(null==n||b.isCellConnectable(d[n]))&&(b.model.isEdge(f)&&null!=n||b.model.isVertex(f)&&b.isCellConnectable(f));if(null!=v&&5E3<=O||v!=l&&(null==k||!mxUtils.contains(k,a,e)||500<
+new mxRectangle(m.x-this.triangleLeft.width,v.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),F));null!=k&&k.grow(10)}J=mxConstants.DIRECTION_NORTH;I==z?J=mxConstants.DIRECTION_EAST:I==C||I==H?J=mxConstants.DIRECTION_SOUTH:I==F&&(J=mxConstants.DIRECTION_WEST);null!=x&&I==D&&(l=x);m=(null==n||b.isCellConnectable(d[n]))&&(b.model.isEdge(f)&&null!=n||b.model.isVertex(f)&&b.isCellConnectable(f));if(null!=v&&5E3<=O||v!=l&&(null==k||!mxUtils.contains(k,a,e)||500<
O&&null==I&&m))if(A=!1,v=5E3>O&&O>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=v&&m){k=[K,H,B,z,C,F];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),K.style.left=Math.floor(m.x-this.roundDrop.width/2)+"px",K.style.top=Math.floor(m.y-this.roundDrop.height/2)+"px",H.style.left=Math.floor(p.x-this.roundDrop.width/2)+"px",H.style.top=Math.floor(p.y-
this.roundDrop.height/2)+"px",null==b.model.getTerminal(f,!0)&&b.container.appendChild(K),null==b.model.getTerminal(f,!1)&&b.container.appendChild(H))):(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)),B.style.left=Math.floor(l.getCenterX()-this.triangleUp.width/2)+"px",B.style.top=Math.floor(m.y-this.triangleUp.height)+"px",z.style.left=Math.floor(m.x+m.width)+"px",z.style.top=Math.floor(l.getCenterY()-this.triangleRight.height/2)+"px",C.style.left=B.style.left,C.style.top=Math.floor(m.y+
m.height)+"px",F.style.left=Math.floor(m.x-this.triangleLeft.width)+"px",F.style.top=z.style.top,"eastwest"!=l.style.portConstraint&&(b.container.appendChild(B),b.container.appendChild(C)),b.container.appendChild(z),b.container.appendChild(F));null!=l&&(y=b.selectionCellsHandler.getHandler(l.cell),null!=y&&null!=y.setHandlesVisible&&y.setHandlesVisible(!1));A=!0}else for(k=[K,H,B,z,C,F],m=0;m<k.length;m++)null!=k[m].parentNode&&k[m].parentNode.removeChild(k[m]);A||null==y||y.setHandlesVisible(!0);
-f=mxEvent.isAltDown(c)&&!mxEvent.isShiftDown(c)||null!=x&&I==E?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);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});u.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var b=[K,H,E,B,
-z,C,F],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=v&&null!=y&&y.reset();I=D=x=v=y=null};return u};
+f=mxEvent.isAltDown(c)&&!mxEvent.isShiftDown(c)||null!=x&&I==D?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);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});u.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var b=[K,H,D,B,
+z,C,F],a=0;a<b.length;a++)null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a]);null!=v&&null!=y&&y.reset();I=E=x=v=y=null};return u};
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})};
@@ -2367,7 +2367,7 @@ this.getLinkForCell(b))return"pointer"};this.selectRegion=function(b,a){var d=th
mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=q&&(t=mxUtils.getBoundingBox(t,q));(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,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,
"locked","0"))return!0;b=this.view.getState(this.model.getParent(b.cell))}return!1};var F=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,a){if("mouseDown"==a.getProperty("eventName")){var d=a.getProperty("event").getState();F=null==d||this.isSelectionEmpty()||this.isCellSelected(d.cell)?null:this.getSelectionCells()}}));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!=F?this.addSelectionCells(F):1<this.getSelectionCount()&&this.isCellSelected(e)&&this.removeSelectionCell(e);F=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 E=this.updateMouseEvent;this.updateMouseEvent=function(b){b=E.apply(this,arguments);this.isCellLocked(b.getCell())&&(b.state=null);return b}}};
+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 D=this.updateMouseEvent;this.updateMouseEvent=function(b){b=D.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.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";
Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_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.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=window!=window.top?document.referrer:document.location.toString();
@@ -2557,7 +2557,7 @@ this.preferHtml&&--d;return new mxRectangleShape(new mxRectangle(0,0,d,d),mxCons
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 z.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 F=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,a){var d=this.graph.getModel(),e=d.getParent(this.state.cell),c=this.graph.getCellGeometry(this.state.cell);
(this.getHandleForEvent(a)==mxEvent.ROTATION_HANDLE||!d.isEdge(e)||null==c||!c.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
-var E=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,a){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(b,a){D.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
+var D=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(b,a){D.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 K=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){K.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 @@ b.height+6+this.state.view.graph.tolerance)+"px"}};var V=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 q(){mxActor.call(this)}function u(){mxActor.call(this)}function t(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,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function v(){mxRectangleShape.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function A(){mxRectangleShape.call(this)}function B(){mxRectangleShape.call(this)}function z(){mxCylinder.call(this)}function C(){mxShape.call(this)}function F(){mxShape.call(this)}function E(){mxEllipse.call(this)}function D(){mxShape.call(this)}
+this.canvas.curveTo=mxUtils.bind(this,t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo)}function v(){mxRectangleShape.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function A(){mxRectangleShape.call(this)}function B(){mxRectangleShape.call(this)}function z(){mxCylinder.call(this)}function C(){mxShape.call(this)}function F(){mxShape.call(this)}function D(){mxEllipse.call(this)}function E(){mxShape.call(this)}
function K(){mxShape.call(this)}function H(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function I(){mxShape.call(this)}function L(){mxShape.call(this)}function M(){mxCylinder.call(this)}function U(){mxDoubleEllipse.call(this)}function V(){mxDoubleEllipse.call(this)}function O(){mxArrowConnector.call(this);this.spacing=0}function G(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function R(){mxRectangleShape.call(this)}function ca(){mxActor.call(this)}
function Z(){mxActor.call(this)}function P(){mxActor.call(this)}function N(){mxActor.call(this)}function Q(){mxActor.call(this)}function X(){mxActor.call(this)}function da(){mxActor.call(this)}function ea(){mxActor.call(this)}function S(){mxActor.call(this)}function aa(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function T(){mxEllipse.call(this)}function Y(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}
function ja(){mxEllipse.call(this)}function la(){mxActor.call(this)}function ia(){mxActor.call(this)}function pa(){mxActor.call(this)}function ya(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)))));
@@ -2607,8 +2607,8 @@ e,c){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.
p=this.style["symbol"+f+"Spacing"]||0,t=this.style["symbol"+f+"ArcSpacing"];null!=t&&(p+=this.getArcSize(e+this.strokewidth,c+this.strokewidth)*t);var t=a,q=d,t=k==mxConstants.ALIGN_CENTER?t+(e-m)/2:k==mxConstants.ALIGN_RIGHT?t+(e-m-p):t+p,q=l==mxConstants.ALIGN_MIDDLE?q+(c-n)/2:l==mxConstants.ALIGN_BOTTOM?q+(c-n-p):q+p;b.save();k=new g;k.style=this.style;g.prototype.paintVertexShape.call(k,b,t,q,m,n);b.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
mxCellRenderer.prototype.defaultShapes.ext=B;mxUtils.extend(z,mxCylinder);z.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=z;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(F,mxShape);F.prototype.getLabelBounds=function(b){return new mxRectangle(b.x+b.width/6,b.y,5*b.width/6,b.height)};F.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=F;mxUtils.extend(E,mxEllipse);E.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=E;mxUtils.extend(D,mxShape);D.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=D;mxUtils.extend(K,mxShape);K.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};K.prototype.paintBackground=function(b,a,d,e,c){b.translate(a,d);b.begin();b.moveTo(3*e/8,c/8*1.1);b.lineTo(5*e/8,0);b.end();b.stroke();b.ellipse(0,c/8,e,7*c/8);b.fillAndStroke()};K.prototype.paintForeground=function(b,a,d,e,c){b.begin();b.moveTo(3*e/8,c/8*1.1);b.lineTo(5*e/8,c/4);b.end();b.stroke()};
+6,0,5*e/6,c);b.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=F;mxUtils.extend(D,mxEllipse);D.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=D;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(K,mxShape);K.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};K.prototype.paintBackground=function(b,a,d,e,c){b.translate(a,d);b.begin();b.moveTo(3*e/8,c/8*1.1);b.lineTo(5*e/8,0);b.end();b.stroke();b.ellipse(0,c/8,e,7*c/8);b.fillAndStroke()};K.prototype.paintForeground=function(b,a,d,e,c){b.begin();b.moveTo(3*e/8,c/8*1.1);b.lineTo(5*e/8,c/4);b.end();b.stroke()};
mxCellRenderer.prototype.defaultShapes.umlControl=K;mxUtils.extend(H,mxRectangleShape);H.prototype.size=40;H.prototype.isHtmlAllowed=function(){return!1};H.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)};H.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!=H&&(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())};H.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=H;mxUtils.extend(J,mxShape);J.prototype.width=60;J.prototype.height=30;J.prototype.corner=10;J.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)};J.prototype.paintBackground=function(b,a,d,e,
@@ -2872,7 +2872,7 @@ k.style.margin="0px";this.addArrow(k);k.style.width="192px";k.style.height="15px
" ("+this.editorUi.actions.get("underline").shortcut+")");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 q=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),u=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),t=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([q,u,t]);if(d.cellEditor.isContentEditing()){var v=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},k);this.styleButtons([v])}var y=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),p),x=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([y,x,A]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var B,z,C,F,E,D,K;d.cellEditor.isContentEditing()?(y.style.display="none",x.style.display="none",
+mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),A=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([y,x,A]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var B,z,C,F,D,E,K;d.cellEditor.isContentEditing()?(y.style.display="none",x.style.display="none",
A.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,B=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" (Ctrl+,)",function(){document.execCommand("subscript",!1,null)},p),z=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" (Ctrl+.)",function(){document.execCommand("superscript",!1,null)},p)]),
C.style.marginRight="9px",v=p.cloneNode(!1),v.style.paddingTop="4px",p=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},v),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},v),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",
!1,null)},v),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},v),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},v)],this.styleButtons(p),p[p.length-1].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),v.style.height="40"),a.appendChild(v)):(m[2].style.marginRight="9px",t.style.marginRight="9px");p=e.cloneNode(!1);p.style.marginLeft="0px";
@@ -2891,13 +2891,13 @@ N.style.display=P.style.display},function(b){null==b||b==mxConstants.NONE?d.setC
ha=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 fa=null,oa=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!=fa&&(d.cellEditor.restoreSelection(fa),fa=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="<font>"+d.cellEditor.textarea.innerHTML+"</font>"),e=d.cellEditor.textarea.firstChild);null!=e&&e!=d.cellEditor.textarea&&(e.style.lineHeight=a+"%");b.value=a+" %"},function(b){oa=b;mxEvent.addListener(b,"mousedown",function(){fa=d.cellEditor.saveSelection()});
mxEvent.addListener(b,"touchstart",function(){fa=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!=E&&d.selectNode(d.insertColumn(E,null!=D?D.cellIndex:0))}catch(ia){alert(ia)}},k),
-this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=E&&d.selectNode(d.insertColumn(E,null!=D?D.cellIndex+1:-1))}catch(ia){alert(ia)}},k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=E&&null!=D&&d.deleteColumn(E,D.cellIndex)}catch(ia){alert(ia)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=E&&null!=
-K&&d.selectNode(d.insertRow(E,K.sectionRowIndex))}catch(ia){alert(ia)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=E&&null!=K&&d.selectNode(d.insertRow(E,K.sectionRowIndex+1))}catch(ia){alert(ia)}},k),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),function(){try{null!=E&&null!=K&&d.deleteRow(E,K.sectionRowIndex)}catch(ia){alert(ia)}},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!=E){var b=E.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?(E.removeAttribute("border"),E.style.border="",E.style.borderCollapse=""):(E.setAttribute("border","1"),E.style.border="1px solid "+b,E.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(){if(null!=E){var b=E.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
-function(b,a,d,e){return"#"+("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(e).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){E.style.backgroundColor=null==b||b==mxConstants.NONE?"":b})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=E){var b=E.getAttribute("cellPadding")||0,b=new FilenameDialog(f,b,mxResources.get("apply"),mxUtils.bind(this,function(b){null!=b&&0<b.length?E.setAttribute("cellPadding",
-b):E.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!=E&&E.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=E&&E.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=E&&E.setAttribute("align","right")},
+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!=D&&d.selectNode(d.insertColumn(D,null!=E?E.cellIndex:0))}catch(ia){alert(ia)}},k),
+this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=D&&d.selectNode(d.insertColumn(D,null!=E?E.cellIndex+1:-1))}catch(ia){alert(ia)}},k),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=D&&null!=E&&d.deleteColumn(D,E.cellIndex)}catch(ia){alert(ia)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=D&&null!=
+K&&d.selectNode(d.insertRow(D,K.sectionRowIndex))}catch(ia){alert(ia)}},k),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=D&&null!=K&&d.selectNode(d.insertRow(D,K.sectionRowIndex+1))}catch(ia){alert(ia)}},k),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),function(){try{null!=D&&null!=K&&d.deleteRow(D,K.sectionRowIndex)}catch(ia){alert(ia)}},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!=D){var b=D.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?(D.removeAttribute("border"),D.style.border="",D.style.borderCollapse=""):(D.setAttribute("border","1"),D.style.border="1px solid "+b,D.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(){if(null!=D){var b=D.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+function(b,a,d,e){return"#"+("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(e).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){D.style.backgroundColor=null==b||b==mxConstants.NONE?"":b})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=D){var b=D.getAttribute("cellPadding")||0,b=new FilenameDialog(f,b,mxResources.get("apply"),mxUtils.bind(this,function(b){null!=b&&0<b.length?D.setAttribute("cellPadding",
+b):D.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!=D&&D.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=D&&D.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=D&&D.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);F=g}else a.appendChild(g),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);var ja=mxUtils.bind(this,function(a,d,e){b=this.format.getSelectionState();a=mxUtils.getValue(b.style,mxConstants.STYLE_FONTSTYLE,0);c(m[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(m[1],(a&mxConstants.FONT_ITALIC)==
mxConstants.FONT_ITALIC);c(m[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);l.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(b.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(n,"0"==mxUtils.getValue(b.style,mxConstants.STYLE_HORIZONTAL,"1"));if(e||document.activeElement!=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(q,a==mxConstants.ALIGN_LEFT);c(u,a==mxConstants.ALIGN_CENTER);c(t,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(y,a==mxConstants.ALIGN_TOP);c(x,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);H.value=a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_TOP?
@@ -2906,7 +2906,7 @@ a==mxConstants.TEXT_DIRECTION_RTL?M.value="rightToLeft":a==mxConstants.TEXT_DIRE
mxConstants.STYLE_SPACING_RIGHT,0)),ha.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Y.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=T)a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_SPACING_LEFT,0)),T.value=isNaN(a)?"":a+" pt"});X=this.installInputHandler(ba,mxConstants.STYLE_SPACING,2,-999,999," pt");Q=this.installInputHandler(aa,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");S=this.installInputHandler(ha,
mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ea=this.installInputHandler(Y,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");da=this.installInputHandler(T,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(O,ja);this.addKeyHandler(ba,ja);this.addKeyHandler(aa,ja);this.addKeyHandler(ha,ja);this.addKeyHandler(Y,ja);this.addKeyHandler(T,ja);d.getModel().addListener(mxEvent.CHANGE,ja);this.listeners.push({destroy:function(){d.getModel().removeListener(ja)}});ja();if(d.cellEditor.isContentEditing()){var la=
!1,e=function(){la||(la=!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(q,"left"==a.textAlign);c(u,"center"==a.textAlign);c(t,"right"==
-a.textAlign);c(C,"justify"==a.textAlign);c(z,null!=d.getParentByName(b,"SUP",d.cellEditor.textarea));c(B,null!=d.getParentByName(b,"SUB",d.cellEditor.textarea));E=d.getParentByName(b,"TABLE",d.cellEditor.textarea);K=null==E?null:d.getParentByName(b,"TR",E);D=null==E?null:d.getParentByName(b,"TD",E);F.style.display=null!=E?"":"none";if(document.activeElement!=O){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=G?(b.removeAttribute("size"),b.style.fontSize=G+"px",G=null):O.value=parseFloat(a.fontSize)+
+a.textAlign);c(C,"justify"==a.textAlign);c(z,null!=d.getParentByName(b,"SUP",d.cellEditor.textarea));c(B,null!=d.getParentByName(b,"SUB",d.cellEditor.textarea));D=d.getParentByName(b,"TABLE",d.cellEditor.textarea);K=null==D?null:d.getParentByName(b,"TR",D);E=null==D?null:d.getParentByName(b,"TD",D);F.style.display=null!=D?"":"none";if(document.activeElement!=O){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=G?(b.removeAttribute("size"),b.style.fontSize=G+"px",G=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);oa.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!=ca&&(Z="#"==b.charAt(0)?b:"#000000",ca(Z,!0));null!=W&&(R="#"==e.charAt(0)?e:null,W(R,!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)}}la=!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);
@@ -2957,13 +2957,13 @@ null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.ed
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(v,8);this.addArrow(z);this.addArrow(C);
-this.addArrow(F);A=this.addArrow(m,9);A.className="geIcon";A.style.width="84px";B=this.addArrow(n,9);B.className="geIcon";B.style.width="22px";var E=document.createElement("div");E.style.width="85px";E.style.height="1px";E.style.borderBottom="1px solid black";E.style.marginBottom="9px";A.appendChild(E);var D=document.createElement("div");D.style.width="23px";D.style.height="1px";D.style.borderBottom="1px solid black";D.style.marginBottom="9px";B.appendChild(D);m.style.height="15px";n.style.height=
+this.addArrow(F);A=this.addArrow(m,9);A.className="geIcon";A.style.width="84px";B=this.addArrow(n,9);B.className="geIcon";B.style.width="22px";var D=document.createElement("div");D.style.width="85px";D.style.height="1px";D.style.borderBottom="1px solid black";D.style.marginBottom="9px";A.appendChild(D);var E=document.createElement("div");E.style.width="23px";E.style.height="1px";E.style.borderBottom="1px solid black";E.style.marginBottom="9px";B.appendChild(E);m.style.height="15px";n.style.height=
"15px";v.style.height="15px";z.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";F.style.marginLeft="3px";F.style.height="17px";a.appendChild(g);a.appendChild(t);a.appendChild(q);m=q.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 K,H,J=this.addUnitInput(m,"pt",74,33,function(){K.apply(this,arguments)}),I=this.addUnitInput(m,"pt",20,33,function(){H.apply(this,arguments)});mxUtils.br(m);A=document.createElement("div");A.style.height="8px";m.appendChild(A);n=n.cloneNode(!1);mxUtils.write(n,mxResources.get("linestart"));m.appendChild(n);var L,M,U=this.addUnitInput(m,"pt",74,33,function(){L.apply(this,arguments)}),V=this.addUnitInput(m,"pt",20,33,function(){M.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,G=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 W=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!=y)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),y.value=isNaN(a)?"":a+" pt";if(f||document.activeElement!=x)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),x.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)?E.style.borderBottom="1px dashed black":E.style.borderBottom="1px dotted black":E.style.borderBottom="1px solid black";D.style.borderBottom=E.style.borderBottom;a=z.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)?D.style.borderBottom="1px dashed black":D.style.borderBottom="1px dotted black":D.style.borderBottom="1px solid black";E.style.borderBottom=D.style.borderBottom;a=z.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";v.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()?(t.style.display="",q.style.display="none"):(t.style.display="none",q.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"),F,"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(z,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(F,
@@ -3907,13 +3907,13 @@ p.vertex=!0;var q=new mxCell("%USER_FULL_NAME%\n%USER_EMAIL%\n%USER_PROFILE_COMP
u.vertex=!0;var t=new mxCell("Email + Push",new mxGeometry(0,460,390,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;align=left;spacingLeft=10;fontSize=16;whiteSpace=wrap;");t.vertex=!0;var v=new mxCell("",new mxGeometry(370,477,10,5),"shape=triangle;strokeColor=none;fillColor=#000000;direction=south;");v.vertex=!0;var y=new mxCell("Tap target",new mxGeometry(410,440,200,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");
y.vertex=!0;var x=new mxCell("Profile Screen",new mxGeometry(410,460,390,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;align=left;spacingLeft=10;fontSize=16;whiteSpace=wrap;");x.vertex=!0;var A=new mxCell("",new mxGeometry(780,477,10,5),"shape=triangle;strokeColor=none;fillColor=#000000;direction=south;");A.vertex=!0;var B=new mxCell("Send to Group",new mxGeometry(0,520,200,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");
B.vertex=!0;var z=new mxCell("Top Management",new mxGeometry(10,543,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox;fontSize=12;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");z.vertex=!0;var C=new mxCell("Marketing Department",new mxGeometry(10,563,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fontSize=12;rSize=3;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");C.vertex=!0;var F=new mxCell("Design Department",
-new mxGeometry(10,583,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox;fontSize=12;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");F.vertex=!0;var E=new mxCell("Financial Department",new mxGeometry(10,603,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fontSize=12;rSize=3;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");E.vertex=!0;var D=new mxCell("Supply Department",new mxGeometry(10,623,14,
-14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fontSize=12;rSize=3;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");D.vertex=!0;var K=new mxCell("Set Type",new mxGeometry(410,520,200,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");K.vertex=!0;var H=new mxCell("",new mxGeometry(420,543,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");
+new mxGeometry(10,583,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox;fontSize=12;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");F.vertex=!0;var D=new mxCell("Financial Department",new mxGeometry(10,603,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fontSize=12;rSize=3;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");D.vertex=!0;var E=new mxCell("Supply Department",new mxGeometry(10,623,14,
+14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fontSize=12;rSize=3;strokeColor=#999999;fillColor=#ffffff;align=left;labelPosition=right;spacingLeft=5;");E.vertex=!0;var K=new mxCell("Set Type",new mxGeometry(410,520,200,20),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");K.vertex=!0;var H=new mxCell("",new mxGeometry(420,543,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");
H.vertex=!0;var J=new mxCell("News",new mxGeometry(440,543,40,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#58B957;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");J.vertex=!0;var I=new mxCell("",new mxGeometry(420,563,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.radioButton;strokeColor=#999999;fillColor=#ffffff;");I.vertex=!0;var L=new mxCell("Reports",new mxGeometry(440,563,50,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#55BFE0;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");
L.vertex=!0;var M=new mxCell("",new mxGeometry(420,583,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");M.vertex=!0;var U=new mxCell("Documents",new mxGeometry(440,583,70,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#EFAC43;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");U.vertex=!0;var V=new mxCell("",new mxGeometry(420,603,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");
V.vertex=!0;var O=new mxCell("Media",new mxGeometry(440,603,40,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#3D8BCD;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");O.vertex=!0;var G=new mxCell("",new mxGeometry(420,623,14,14),"shape=ellipse;dashed=0;strokeColor=#999999;fillColor=#ffffff;html=1;");G.vertex=!0;var W=new mxCell("Text",new mxGeometry(440,623,30,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=3;strokeColor=none;fillColor=#999999;fontColor=#ffffff;fontStyle=1;fontSize=10;whiteSpace=wrap;");
W.vertex=!0;var R=new mxCell("Save Template",new mxGeometry(0,680,150,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=5;strokeColor=none;fillColor=#3D8BCD;fontColor=#ffffff;fontSize=16;whiteSpace=wrap;");R.vertex=!0;var ca=new mxCell("Cancel",new mxGeometry(170,680,100,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;fillColor=#ffffff;align=center;rSize=5;strokeColor=#dddddd;fontSize=16;whiteSpace=wrap;");ca.vertex=!0;var Z=new mxCell("Delete Template",new mxGeometry(630,
-680,170,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=5;strokeColor=none;fillColor=#DB524C;fontColor=#ffffff;fontSize=16;whiteSpace=wrap;");Z.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,q,u,t,v,y,x,A,B,z,C,F,E,D,K,H,J,I,L,M,U,V,O,G,W,R,ca,Z],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,0,800,50),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.horLines;strokeColor=#dddddd;fillColor=#fdfdfd;");
+680,170,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;align=center;rSize=5;strokeColor=none;fillColor=#DB524C;fontColor=#ffffff;fontSize=16;whiteSpace=wrap;");Z.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,m,n,p,q,u,t,v,y,x,A,B,z,C,F,D,E,K,H,J,I,L,M,U,V,O,G,W,R,ca,Z],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,0,800,50),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.horLines;strokeColor=#dddddd;fillColor=#fdfdfd;");
c.vertex=!0;var d=new mxCell("2 fields selected",new mxGeometry(0,.5,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox;strokeColor=#dddddd;fillColor=none;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;");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,.5,90,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;whiteSpace=wrap;");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,.5,120,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;whiteSpace=wrap;");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,.5,100,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;strokeColor=#dddddd;;fillColor=#ffffff;whiteSpace=wrap;");
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=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rect;strokeColor=none;fillColor=none;fontColor=#999999;align=left;spacingLeft=5;whiteSpace=wrap;");d.vertex=!0;var b=new mxCell("",new mxGeometry(13,103,14,14),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox;strokeColor=#999999;fillColor=#ffffff;");b.vertex=!0;var e=new mxCell("+38 (066) 875 67 97",new mxGeometry(40,
@@ -7088,7 +7088,7 @@ k(c4&63)},l=new XMLHttpRequest;l.open("GET",e+function(a){r="";for(n=0;n<a.lengt
f.getModel().beginUpdate();try{cell=f.insertVertex(null,null,c,b.x,b.y,e.width,e.height,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(d.target.result)+";")}finally{f.getModel().endUpdate()}f.setSelectionCell(cell);f.scrollCellToVisible(f.getSelectionCell())};e.src=d.target.result},d.onerror=function(b){a.handleError(b)}):(a.spinner.stop(),a.handleError(d))};l.onerror=function(b){a.handleError(b)};l.send()}}else if("list"==d){if(0<e.length){var f=a.editor.graph,
m=new mxCell(e[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");m.vertex=!0;l=f.getPreferredSizeForCell(m);null!=l&&m.geometry.width<l.width+10&&(m.geometry.width=l.width+10);if(1<e.length)for(var n=1;n<e.length;n++)if("--"==e[n])l=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),
l.vertex=!0,m.geometry.height+=l.geometry.height,m.insert(l);else if(0<e[n].length&&";"!=e[n].charAt(0)){var p=new mxCell(e[n],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;");p.vertex=!0;l=f.getPreferredSizeForCell(p);null!=l&&p.geometry.width<l.width&&(p.geometry.width=l.width);m.geometry.width=Math.max(m.geometry.width,p.geometry.width);m.geometry.height+=
-p.geometry.height;m.insert(p)}f.setSelectionCells(f.importCells([m],b.x,b.y));f.scrollCellToVisible(f.getSelectionCell())}}else{for(var p=function(a){var b=q[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30)),b.vertex=!0,q[a]=b,F.push(b));return b},q={},F=[],n=0;n<e.length;n++)if(";"!=e[n].charAt(0)){var E=e[n].split("->");if(2==E.length){var D=p(E[0]),E=p(E[1]),K=new mxCell("",new mxGeometry);K.edge=!0;D.insertEdge(K,!0);E.insertEdge(K,!1);F.push(K)}}if(0<F.length){e=document.createElement("div");
+p.geometry.height;m.insert(p)}f.setSelectionCells(f.importCells([m],b.x,b.y));f.scrollCellToVisible(f.getSelectionCell())}}else{for(var p=function(a){var b=q[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30)),b.vertex=!0,q[a]=b,F.push(b));return b},q={},F=[],n=0;n<e.length;n++)if(";"!=e[n].charAt(0)){var D=e[n].split("->");if(2==D.length){var E=p(D[0]),D=p(D[1]),K=new mxCell("",new mxGeometry);K.edge=!0;E.insertEdge(K,!0);D.insertEdge(K,!1);F.push(K)}}if(0<F.length){e=document.createElement("div");
e.style.visibility="hidden";document.body.appendChild(e);f=new Graph(e);f.getModel().beginUpdate();try{F=f.importCells(F);for(n=0;n<F.length;n++)f.getModel().isVertex(F[n])&&(l=f.getPreferredSizeForCell(F[n]),F[n].geometry.width=Math.max(F[n].geometry.width,l.width),F[n].geometry.height=Math.max(F[n].geometry.height,l.height));m=new mxFastOrganicLayout(f);m.disableEdgeStyle=!1;m.forceConstant=120;m.execute(f.getDefaultParent())}finally{f.getModel().endUpdate()}f.clearCellOverlays();a.editor.graph.setSelectionCells(a.editor.graph.importCells(f.getModel().getChildren(f.getDefaultParent()),
b.x,b.y));a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());f.destroy();e.parentNode.removeChild(e)}}}function d(){return"list"==k.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":"plantUmlPng"==k.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":
"plantUmlSvg"==k.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->c\nc->a\n"}var b=a.editor.graph.getFreeInsertPoint(),e=document.createElement("div");e.style.textAlign="right";var g=document.createElement("textarea");g.style.resize="none";g.style.width="100%";g.style.height="354px";g.style.marginBottom=
@@ -7134,34 +7134,35 @@ k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",c=d
PrintDialog.prototype.create=function(a,c){function f(){u.value=Math.max(1,Math.min(k,Math.max(parseInt(u.value),parseInt(q.value))));q.value=Math.max(1,Math.min(k,Math.min(parseInt(u.value),parseInt(q.value))))}function d(c){function d(a,b,c){var d=a.getGraphBounds(),f=0,k=0,g=L.get(),l=1/a.pageScale,m=x.checked;if(m)var l=parseInt(J.value),n=parseInt(I.value),l=Math.min(g.height*n/(d.height/a.view.scale),g.width*l/(d.width/a.view.scale));else l=parseInt(y.value)/(100*a.pageScale),isNaN(l)&&(e=1/
a.pageScale,y.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*e);g.height=Math.ceil(g.height*e);l*=e;!m&&a.pageVisible?(d=a.getPageLayout(),f-=d.x*g.width,k-=d.y*g.height):m=!0;if(null==b){b=PrintDialog.createPrintPreview(a,l,g,0,f,k,m);b.pageSelector=!1;b.mathEnabled=!1;if("undefined"!==typeof MathJax){var p=b.renderPage;b.renderPage=function(a,b,c,d,e,f){var k=p.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:k.className="geDisableMathJax";return k}}b.open(null,
null,c,!0)}else{g=a.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";b.backgroundColor=g;b.autoOrigin=m;b.appendGraph(a,l,f,k,c,!0)}return b}var e=parseInt(M.value)/100;isNaN(e)&&(e=1,M.value="100 %");var e=.75*e,f=q.value,k=u.value,g=!n.checked,m=null;g&&(g=f==l&&k==l);if(!g&&null!=a.pages&&a.pages.length){var p=0,g=a.pages.length-1;n.checked||(p=parseInt(f)-1,g=parseInt(k)-1);for(var t=p;t<=g;t++){var v=a.pages[t],f=v==a.currentPage?b:null;if(null==f){var f=a.createTemporaryGraph(b.getStylesheet()),
-k=!0,p=!1,z=null,A=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(k=v.viewState.pageVisible,p=v.viewState.mathEnabled,z=v.viewState.background,A=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(p="0"!=v.mapping.diagramMap.get("mathEnabled"),z=v.mapping.diagramMap.get("background"),A=v.mapping.diagramMap.get("backgroundImage"),A=null!=A&&0<A.length?JSON.parse(A):null);f.background=z;f.backgroundImage=null!=A?new mxImage(A.src,
-A.width,A.height):null;f.pageVisible=k;f.mathEnabled=p;var B=f.getGlobalVariable;f.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?t+1:B.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(v);f.model.setRoot(v.root)}m=d(f,m,t!=g);f!=b&&f.container.parentNode.removeChild(f.container)}}else m=d(b);m.mathEnabled&&(g=m.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln('messageStyle: "none",'),
+k=!0,p=!1,A=null,z=null;null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(k=v.viewState.pageVisible,p=v.viewState.mathEnabled,A=v.viewState.background,z=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(p="0"!=v.mapping.diagramMap.get("mathEnabled"),A=v.mapping.diagramMap.get("background"),z=v.mapping.diagramMap.get("backgroundImage"),z=null!=z&&0<z.length?JSON.parse(z):null);f.background=A;f.backgroundImage=null!=z?new mxImage(z.src,
+z.width,z.height):null;f.pageVisible=k;f.mathEnabled=p;var B=f.getGlobalVariable;f.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?t+1:B.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(v);f.model.setRoot(v.root)}m=d(f,m,t!=g);f!=b&&f.container.parentNode.removeChild(f.container)}}else m=d(b);m.mathEnabled&&(g=m.wnd.document,g.writeln('<script type="text/x-mathjax-config">'),g.writeln("MathJax.Hub.Config({"),g.writeln('messageStyle: "none",'),
g.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),g.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),g.writeln("TeX: {"),g.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),g.writeln("},"),g.writeln("tex2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("},"),g.writeln("asciimath2jax: {"),g.writeln('\tignoreClass: "geDisableMathJax"'),g.writeln("}"),g.writeln("});"),c&&(g.writeln("MathJax.Hub.Queue(function () {"),
g.writeln("window.print();"),g.writeln("});")),g.writeln("\x3c/script>"),g.writeln('<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js">\x3c/script>'));m.closeDocument();!m.mathEnabled&&c&&PrintDialog.printPreview(m)}var b=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var k=1,l=1,m=document.createElement("div");
m.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");m.appendChild(n);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));m.appendChild(g);mxUtils.br(m);var p=n.cloneNode(!0);n.setAttribute("checked","checked");p.setAttribute("value","range");
m.appendChild(p);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");m.appendChild(g);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.style.width="50px";m.appendChild(q);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));m.appendChild(g);var u=q.cloneNode(!0);m.appendChild(u);mxEvent.addListener(q,"focus",function(){p.checked=!0});mxEvent.addListener(u,
"focus",function(){p.checked=!0});mxEvent.addListener(q,"change",f);mxEvent.addListener(u,"change",f);if(null!=a.pages&&(k=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){l=g+1;q.value=l;u.value=l;break}q.setAttribute("max",k);u.setAttribute("max",k);1<k&&e.appendChild(m);var t=document.createElement("div");t.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type",
"radio");v.setAttribute("name","printZoom");t.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));t.appendChild(g);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";t.appendChild(y);mxEvent.addListener(y,"focus",function(){v.checked=!0});e.appendChild(t);var m=m.cloneNode(!1),x=v.cloneNode(!0);x.setAttribute("value","fit");v.setAttribute("checked","checked");g=document.createElement("div");
-g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(x);m.appendChild(g);t=document.createElement("table");t.style.display="inline-block";var A=document.createElement("tbody"),B=document.createElement("tr"),z=B.cloneNode(!0),C=document.createElement("td"),F=C.cloneNode(!0),E=C.cloneNode(!0),D=C.cloneNode(!0),K=C.cloneNode(!0),H=C.cloneNode(!0);C.style.textAlign="right";D.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var J=document.createElement("input");
-J.style.cssText="margin:0 8px 0 8px;";J.setAttribute("value","1");J.setAttribute("min","1");J.setAttribute("type","number");J.style.width="40px";F.appendChild(J);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));E.appendChild(g);mxUtils.write(D,mxResources.get("fitToBy"));var I=J.cloneNode(!0);K.appendChild(I);mxEvent.addListener(J,"focus",function(){x.checked=!0});mxEvent.addListener(I,"focus",function(){x.checked=!0});g=document.createElement("span");mxUtils.write(g,
-mxResources.get("fitToSheetsDown"));H.appendChild(g);B.appendChild(C);B.appendChild(F);B.appendChild(E);z.appendChild(D);z.appendChild(K);z.appendChild(H);A.appendChild(B);A.appendChild(z);t.appendChild(A);m.appendChild(t);e.appendChild(m);m=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));m.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var L=PageSetupDialog.addPageFormatPanel(g,
+g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(x);m.appendChild(g);t=document.createElement("table");t.style.display="inline-block";var A=document.createElement("tbody"),B=document.createElement("tr"),z=B.cloneNode(!0),C=document.createElement("td"),F=C.cloneNode(!0),D=C.cloneNode(!0),E=C.cloneNode(!0),K=C.cloneNode(!0),H=C.cloneNode(!0);C.style.textAlign="right";E.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var J=document.createElement("input");
+J.style.cssText="margin:0 8px 0 8px;";J.setAttribute("value","1");J.setAttribute("min","1");J.setAttribute("type","number");J.style.width="40px";F.appendChild(J);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));D.appendChild(g);mxUtils.write(E,mxResources.get("fitToBy"));var I=J.cloneNode(!0);K.appendChild(I);mxEvent.addListener(J,"focus",function(){x.checked=!0});mxEvent.addListener(I,"focus",function(){x.checked=!0});g=document.createElement("span");mxUtils.write(g,
+mxResources.get("fitToSheetsDown"));H.appendChild(g);B.appendChild(C);B.appendChild(F);B.appendChild(D);z.appendChild(E);z.appendChild(K);z.appendChild(H);A.appendChild(B);A.appendChild(z);t.appendChild(A);m.appendChild(t);e.appendChild(m);m=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));m.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var L=PageSetupDialog.addPageFormatPanel(g,
"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));m.appendChild(g);var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","100 %");M.style.width="60px";m.appendChild(M);e.appendChild(m);g=document.createElement("div");g.style.cssText="text-align:right;margin:62px 0 0 0;";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
m.className="geBtn";a.editor.cancelFirst&&g.appendChild(m);a.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947-how-to-print-")}),t.className="geBtn",g.appendChild(t));mxClient.IS_CHROMEAPP||(t=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),t.className="geBtn",g.appendChild(t));t=mxUtils.button(mxResources.get(mxClient.IS_CHROMEAPP?"ok":"print"),function(){a.hideDialog();d(!0)});t.className=
"geBtn gePrimaryBtn";g.appendChild(t);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};
-var LinkDialog=function(a,c,f,d){var b=document.createElement("div");mxUtils.write(b,mxResources.get("editLink")+":");var e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var g=document.createElement("input");g.setAttribute("value",c);g.setAttribute("placeholder",mxResources.get("dragUrlsHere"));
-g.setAttribute("type","text");g.style.marginTop="6px";g.style.width="400px";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=
-(mxClient.IS_VML?0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){g.value="";g.focus()});e.appendChild(g);e.appendChild(c);b.appendChild(e);var k=mxUtils.button(f,function(){a.hideDialog();d(g.value,LinkDialog.selectedDocs)});k.className="geBtn gePrimaryBtn";this.init=function(){g.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null);if(Graph.fileSupport){var c=b.parentNode,
-d=null;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(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=a.highlightElement(c));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(g.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),
-k.click());a.stopPropagation();a.preventDefault()}),!1)}};f=document.createElement("div");f.style.marginTop="14px";f.style.textAlign="right";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&f.appendChild(e);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?
-(b=DriveClient.prototype.oldAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(b=DriveClient.prototype.newAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);g.value=b}else LinkDialog.selectedDocs=null;g.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&(c=mxUtils.button(mxResources.get("googlePlus"),
-function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),d=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(c).addView(d).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);
-"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0);a.movePickersToTop()}))}),c.className="geBtn",f.appendChild(c));"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&(c=mxUtils.button(mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){g.value=
-a[0].link}})}),c.className="geBtn",f.appendChild(c));"undefined"!=typeof WL&&"undefined"!=typeof WL.fileDialog&&null!=a.oneDrive&&(c=mxUtils.button(mxResources.get("oneDrive"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.oneDrive.execute(mxUtils.bind(this,function(b){null!=b&&(a.spinner.stop(),WL.fileDialog({mode:"open",select:"single"}).then(function(a){null!=a&&null!=a.data&&null!=a.data.files&&0<a.data.files.length&&(g.value=a.data.files[0].link)},function(a){}))}))}),
-c.className="geBtn",f.appendChild(c));mxEvent.addListener(g,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(g.value,LinkDialog.selectedDocs))});f.appendChild(k);a.editor.cancelFirst||f.appendChild(e);b.appendChild(f);this.container=b},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.style.width="170px";f.style.height=
-"219px";f.setAttribute("src",IMAGE_PATH+"/logo-flat.png");c.appendChild(f);mxUtils.br(c);f=document.createElement("small");f.innerHTML="v "+EditorUi.VERSION;f.style.color="#505050";c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=document.createElement("small");f.style.color="#505050";f.innerHTML='&copy; 2005-2017 <a href="https://www.jgraph.com/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';c.appendChild(f);mxEvent.addListener(c,"click",function(c){"A"!=mxEvent.getSource(c).nodeName&&
-a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedbackToDrawIo"));f.style.fontSize="18px";f.style.marginBottom="18px";c.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(f);var d=document.createElement("input");d.setAttribute("type","text");d.style.marginTop="6px";d.style.width=
-"600px";var b=mxUtils.button(mxResources.get("sendMessage"),function(){var b=(g.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(d.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+
-"&body="+encodeURIComponent("Feedback:\n"+l.value+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});b.className="geBtn gePrimaryBtn";b.setAttribute("disabled","disabled");var e=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
+var LinkDialog=function(a,c,f,d){function b(a,b,c){c=mxUtils.button("",c);c.className="geBtn";c.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";b.style.width="26px";b.setAttribute("src",a);b.setAttribute("valign","bottom");c.style.minWidth="42px";c.appendChild(b);m.appendChild(c)}var e=document.createElement("div");mxUtils.write(e,mxResources.get("editLink")+":");var g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor=
+"transparent";g.style.whiteSpace="nowrap";g.style.textOverflow="clip";g.style.cursor="default";mxClient.IS_VML||(g.style.paddingRight="20px");var k=document.createElement("input");k.setAttribute("value",c);k.setAttribute("placeholder",mxResources.get("dragUrlsHere"));k.setAttribute("type","text");k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.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?0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){k.value="";k.focus()});g.appendChild(k);g.appendChild(c);e.appendChild(g);var l=mxUtils.button(f,function(){a.hideDialog();
+d(k.value,LinkDialog.selectedDocs)});l.className="geBtn gePrimaryBtn";this.init=function(){k.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null);if(Graph.fileSupport){var b=e.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&
+(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(k.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),l.click());a.stopPropagation();a.preventDefault()}),!1)}};var m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+f.className="geBtn";a.editor.cancelFirst&&m.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(b=DriveClient.prototype.oldAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(b=DriveClient.prototype.newAppHostname,
+b="https://"+b+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);k.value=b}else LinkDialog.selectedDocs=null;k.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&b(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=
+gapi.auth.getToken().access_token,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),d=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(c).addView(d).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);
+"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0);a.movePickersToTop()}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){k.value=a[0].link}})});
+"undefined"!=typeof WL&&"undefined"!=typeof WL.fileDialog&&null!=a.oneDrive&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){WL.fileDialog({mode:"open",select:"single"}).then(function(a){null!=a&&null!=a.data&&null!=a.data.files&&0<a.data.files.length&&(k.value=a.data.files[0].link)},function(a){})});null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],d=a[2];a=a.slice(3,
+a.length).join("/");k.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a}})});mxEvent.addListener(k,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),d(k.value,LinkDialog.selectedDocs))});m.appendChild(l);a.editor.cancelFirst||m.appendChild(f);e.appendChild(m);this.container=e},AboutDialog=function(a){var c=document.createElement("div");c.style.marginTop="6px";c.setAttribute("align","center");var f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width",
+"151");f.style.width="170px";f.style.height="219px";f.setAttribute("src",IMAGE_PATH+"/logo-flat.png");c.appendChild(f);mxUtils.br(c);f=document.createElement("small");f.innerHTML="v "+EditorUi.VERSION;f.style.color="#505050";c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=document.createElement("small");f.style.color="#505050";f.innerHTML='&copy; 2005-2017 <a href="https://www.jgraph.com/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';c.appendChild(f);mxEvent.addListener(c,
+"click",function(c){"A"!=mxEvent.getSource(c).nodeName&&a.hideDialog()});this.container=c},FeedbackDialog=function(a){var c=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedbackToDrawIo"));f.style.fontSize="18px";f.style.marginBottom="18px";c.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");c.appendChild(f);var d=document.createElement("input");d.setAttribute("type",
+"text");d.style.marginTop="6px";d.style.width="600px";var b=mxUtils.button(mxResources.get("sendMessage"),function(){var b=(g.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(d.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+
+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+l.value+b),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});b.className="geBtn gePrimaryBtn";b.setAttribute("disabled","disabled");var e=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
mxEvent.addListener(d,"change",function(){0<d.value.length&&0<e.test(d.value)?b.removeAttribute("disabled"):b.setAttribute("disabled","disabled")});mxEvent.addListener(d,"keyup",function(){0<d.value.length&&e.test(d.value)?b.removeAttribute("disabled"):b.setAttribute("disabled","disabled")});c.appendChild(d);this.init=function(){d.focus()};var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;f=document.createElement("p");f.style.marginTop=
"14px";f.appendChild(g);var k=document.createElement("span");mxUtils.write(k," "+mxResources.get("includeCopyOfMyDiagram"));f.appendChild(k);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});c.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("feedback"));c.appendChild(f);var l=document.createElement("textarea");l.style.resize="none";l.style.width="600px";l.style.height="140px";l.style.marginTop="6px";l.setAttribute("placeholder",mxResources.get("commentsNotes"));
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;
@@ -7171,19 +7172,19 @@ g.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEn
x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var A=mxUtils.button("",function(){null!=v&&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 B=mxUtils.button("",function(){null!=v&&(g.maxFitScale=8,g.fit(8),g.center())});B.className=
"geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var z=mxUtils.button("",function(){null!=v&&(g.zoomActual(),g.center())});z.className="geSprite geSprite-actualsize";z.setAttribute("title",mxResources.get("actualSize"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,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 F=mxUtils.button(mxResources.get("download"),function(){if(null!=v){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(v.documentElement);a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml"):
-(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});F.className="geBtn";F.setAttribute("disabled","disabled");var E=mxUtils.button(mxResources.get("restore"),function(){null!=v&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){a.spinner.spin(document.body,mxResources.get("restoring"))&&q.save(!0,function(b){a.spinner.stop();
-a.replaceFileData(y);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});E.className="geBtn";E.setAttribute("disabled","disabled");var D=document.createElement("select");D.setAttribute("disabled","disabled");D.style.maxWidth="80px";D.style.position="relative";D.style.top="-2px";D.style.verticalAlign="bottom";D.style.marginRight="6px";D.style.display="none";var K=null;mxEvent.addListener(D,"change",function(a){null!=
+(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});F.className="geBtn";F.setAttribute("disabled","disabled");var D=mxUtils.button(mxResources.get("restore"),function(){null!=v&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){a.spinner.spin(document.body,mxResources.get("restoring"))&&q.save(!0,function(b){a.spinner.stop();
+a.replaceFileData(y);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});D.className="geBtn";D.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 K=null;mxEvent.addListener(E,"change",function(a){null!=
K&&(K(a),mxEvent.consume(a))});var H=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=v&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(v.documentElement)),window.openWindow(a.getUrl()))});H.className="geBtn";H.setAttribute("disabled","disabled");var J=mxUtils.button(mxResources.get("show"),function(){null!=t&&window.open(t.getUrl())});J.className="geBtn gePrimaryBtn";J.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==q||null==a.drive&&q.constructor==window.DriveFile||null==a.dropbox&&q.constructor==window.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 M=document.createElement("table");M.style.border="1px solid lightGray";M.style.borderCollapse="collapse";M.style.borderSpacing="0px";M.style.width="100%";var U=document.createElement("tbody"),V=(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 G=function(b){var d=new Date(b.modifiedDate),f=null;if(0<=d.getTime()){var n=function(b){p.stop();var c=mxUtils.parseXml(b),
-n=a.editor.extractGraphModel(c.documentElement,!0);if(null!=n){var t=function(b){null!=b&&(b=u(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},u=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};D.style.display="none";D.innerHTML="";v=c;y=b;l=parseSelectFunction=null;m=0;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&&t(l[m]);if(1<l.length)for(D.removeAttribute("disabled"),D.style.display="",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"),D.appendChild(c);K=function(){m=k=parseInt(D.value);t(l[k])}}else u(n);C.innerHTML="";mxUtils.write(C,
-d.toLocaleDateString()+" "+d.toLocaleTimeString());C.setAttribute("title",f.getAttribute("title"));x.removeAttribute("disabled");A.removeAttribute("disabled");B.removeAttribute("disabled");z.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&E.removeAttribute("disabled"),F.removeAttribute("disabled"),J.removeAttribute("disabled"),H.removeAttribute("disabled"));mxUtils.setOpacity(x,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(z,60)}else D.style.display=
-"none",D.innerHTML="",C.innerHTML="",mxUtils.write(C,mxResources.get("errorLoadingFile"))},f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var I=document.createElement("td");I.style.padding="6px";I.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(I,mxResources.get("current")):d.toDateString()===V?mxUtils.write(I,d.toLocaleTimeString()):mxUtils.write(I,d.toLocaleDateString()+" "+d.toLocaleTimeString());f.appendChild(I);
-f.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){t!=b&&(p.stop(),null!=u&&(u.style.backgroundColor=""),t=b,u=f,u.style.backgroundColor="#ebf2f9",y=v=null,C.removeAttribute("title"),C.innerHTML=mxResources.get("loading")+"...",e.style.backgroundColor="#ffffff",g.getModel().clear(),E.setAttribute("disabled","disabled"),F.setAttribute("disabled",
-"disabled"),x.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),mxUtils.setOpacity(x,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(z,20),p.spin(e),b.getXml(function(a){t==b&&n(a)},function(a){p.stop();D.style.display="none";D.innerHTML="";C.innerHTML="";mxUtils.write(C,
+n=a.editor.extractGraphModel(c.documentElement,!0);if(null!=n){var t=function(b){null!=b&&(b=u(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},u=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};E.style.display="none";E.innerHTML="";v=c;y=b;l=parseSelectFunction=null;m=0;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&&t(l[m]);if(1<l.length)for(E.removeAttribute("disabled"),E.style.display="",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);K=function(){m=k=parseInt(E.value);t(l[k])}}else u(n);C.innerHTML="";mxUtils.write(C,
+d.toLocaleDateString()+" "+d.toLocaleTimeString());C.setAttribute("title",f.getAttribute("title"));x.removeAttribute("disabled");A.removeAttribute("disabled");B.removeAttribute("disabled");z.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&D.removeAttribute("disabled"),F.removeAttribute("disabled"),J.removeAttribute("disabled"),H.removeAttribute("disabled"));mxUtils.setOpacity(x,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(z,60)}else E.style.display=
+"none",E.innerHTML="",C.innerHTML="",mxUtils.write(C,mxResources.get("errorLoadingFile"))},f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var I=document.createElement("td");I.style.padding="6px";I.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(I,mxResources.get("current")):d.toDateString()===V?mxUtils.write(I,d.toLocaleTimeString()):mxUtils.write(I,d.toLocaleDateString()+" "+d.toLocaleTimeString());f.appendChild(I);
+f.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){t!=b&&(p.stop(),null!=u&&(u.style.backgroundColor=""),t=b,u=f,u.style.backgroundColor="#ebf2f9",y=v=null,C.removeAttribute("title"),C.innerHTML=mxResources.get("loading")+"...",e.style.backgroundColor="#ffffff",g.getModel().clear(),D.setAttribute("disabled","disabled"),F.setAttribute("disabled",
+"disabled"),x.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),mxUtils.setOpacity(x,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(z,20),p.spin(e),b.getXml(function(a){t==b&&n(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){J.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);U.appendChild(f)}return f}(c[O]);null!=G&&O==c.length-1&&(L=G)}M.appendChild(U);b.appendChild(M)}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(D);I.appendChild(x);I.appendChild(A);I.appendChild(z);I.appendChild(B);a.editor.cancelFirst?(d.appendChild(b),d.appendChild(F),d.appendChild(H),d.appendChild(E),d.appendChild(J)):(d.appendChild(F),d.appendChild(H),d.appendChild(E),d.appendChild(J),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");
+function(){a.hideDialog()});b.className="geBtn";I.appendChild(E);I.appendChild(x);I.appendChild(A);I.appendChild(z);I.appendChild(B);a.editor.cancelFirst?(d.appendChild(b),d.appendChild(F),d.appendChild(H),d.appendChild(D),d.appendChild(J)):(d.appendChild(F),d.appendChild(H),d.appendChild(D),d.appendChild(J),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,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),q=0,u=null,t=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=u&&null!=u[q]?u[q].getAttribute("name"):"pagenumber"==a?q+1:t.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 v=mxUtils.button("",function(){n.zoomActual();n.center()});
@@ -7192,7 +7193,7 @@ v.className="geSprite geSprite-actualsize";v.setAttribute("title",mxResources.ge
n.getModel());n.maxFitScale=1;n.fit(8);n.center()}}function c(c){null!=c&&(c=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c}mxEvent.addListener(y,"change",function(a){q=parseInt(y.value);c(u[q]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var d=p.getElementsByTagName("diagram");u=[];for(var e=0;e<d.length;e++)u.push(d[e]);0<u.length&&c(u[q]);if(1<u.length)for(y.style.display="",e=0;e<u.length;e++)d=document.createElement("option"),mxUtils.write(d,
u[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),d.setAttribute("value",e),e==q&&d.setAttribute("selected","selected"),y.appendChild(d)}else b(p)};g.appendChild(y);g.appendChild(c);g.appendChild(f);g.appendChild(v);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},FindWindow=function(a,c,f,d,b){function e(){var a=k.model.getDescendants(k.model.getRoot()),b=p.value.toLowerCase(),c=q.checked?new RegExp(b):null,d=null;l!=b&&(l=b,m=null);var e=null==m;if(k.isEnabled()&&0<b.length)for(var f=0;f<a.length;f++){var g=k.view.getState(a[f]);if(null!=g&&null!=g.cell.value&&(e||null==d)&&(k.model.isVertex(g.cell)||k.model.isEdge(g.cell))){k.isHtmlLabel(g.cell)?(u.innerHTML=k.getLabel(g.cell),label=mxUtils.extractTextWithWhitespace([u])):label=k.getLabel(g.cell);
-label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var n;if(!(n=null==c&&label.substring(0,b.length)===b)&&(n=null!=c)&&!(n=c.test(label)))a:{n=c;var t=g.cell;if("object"===typeof t.value&&null!=t.value.attributes)for(var t=t.value.attributes,D=0;D<t.length;D++)if("label"!=t[D].nodeName&&n.test(t[D].nodeValue.toLowerCase())){n=!0;break a}n=!1}if(n)if(e){d=g;break}else null==d&&(d=g)}e=e||g==m}null!=d?(m=d,k.setSelectionCell(m.cell),k.scrollCellToVisible(m.cell)):k.clearSelection();
+label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var n;if(!(n=null==c&&label.substring(0,b.length)===b)&&(n=null!=c)&&!(n=c.test(label)))a:{n=c;var t=g.cell;if("object"===typeof t.value&&null!=t.value.attributes)for(var t=t.value.attributes,E=0;E<t.length;E++)if("label"!=t[E].nodeName&&n.test(t[E].nodeValue.toLowerCase())){n=!0;break a}n=!1}if(n)if(e){d=g;break}else null==d&&(d=g)}e=e||g==m}null!=d?(m=d,k.setSelectionCell(m.cell),k.scrollCellToVisible(m.cell)):k.clearSelection();
return!k.isEnabled()||0==b.length||null!=d}var g=a.actions.get("find"),k=a.editor.graph,l=null,m=null,n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var p=document.createElement("input");p.setAttribute("placeholder",mxResources.get("find"));p.setAttribute("type","text");p.style.marginTop="4px";p.style.marginBottom="6px";p.style.width="170px";p.style.fontSize="12px";p.style.borderRadius="4px";p.style.padding="6px";n.appendChild(p);
var q=document.createElement("input");q.setAttribute("type","checkbox");n.appendChild(q);mxUtils.write(n,mxResources.get("regularExpression"));var u=document.createElement("div");mxUtils.br(n);var t=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";l=m=null;p.focus()});t.setAttribute("title",mxResources.get("reset"));t.style.marginTop="6px";t.style.marginRight="4px";t.style.backgroundColor="#f5f5f5";t.style.backgroundImage="none";t.className="geBtn";n.appendChild(t);
t=mxUtils.button(mxResources.get("find"),function(){try{p.style.backgroundColor=e()?"":"#ffcfcf"}catch(v){a.handleError(v)}});t.setAttribute("title",mxResources.get("find")+" (Enter)");t.style.marginTop="6px";t.style.backgroundColor="#4d90fe";t.style.backgroundImage="none";t.className="geBtn gePrimaryBtn";n.appendChild(t);mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)g.funct();else if(l!=p.value.toLowerCase()||13==a.keyCode)try{p.style.backgroundColor=
@@ -7202,17 +7203,17 @@ mxUtils.trim(b[g]).toLowerCase(),f=f&&(0==m.length||0<=mxUtils.indexOf(e,m));els
n.setAttribute("type","text");n.style.marginTop="4px";n.style.width="240px";n.style.fontSize="12px";n.style.borderRadius="4px";n.style.padding="6px";m.appendChild(n);mxEvent.addListener(n,"dblclick",function(){var b=new FilenameDialog(a,l,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(l=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,300,80,!0,!0);b.init()});n.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(m);var p=mxUtils.button(mxResources.get("hide"),
function(){g(e(),!1)});p.setAttribute("title",mxResources.get("hide"));p.style.marginTop="8px";p.style.marginRight="4px";p.style.backgroundColor="#f5f5f5";p.style.backgroundImage="none";p.className="geBtn";m.appendChild(p);p=mxUtils.button(mxResources.get("show"),function(){var a=e();g(a,!0);k.setSelectionCells(a)});p.setAttribute("title",mxResources.get("show"));p.style.marginTop="8px";p.style.marginRight="4px";p.style.backgroundColor="#f5f5f5";p.style.backgroundImage="none";p.className="geBtn";
m.appendChild(p);var q=a.actions.get("tags"),p=mxUtils.button(mxResources.get("close"),function(){q.funct()});p.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");p.style.marginTop="8px";p.style.backgroundColor="#4d90fe";p.style.backgroundImage="none";p.className="geBtn gePrimaryBtn";m.appendChild(p);mxEvent.addListener(n,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||q.funct()});this.window=new mxWindow(mxResources.get("tags"),m,c,f,d,b,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
-this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(n.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):k.container.focus()}))},AnimationWindow=function(a,c,f,d,b){function e(a){for(var b=[],c=0;c<a.length;c++){var d=E.view.getState(a[c]);if(null!=d){for(var e=E.cellRenderer.getShapesForState(d),f=0;f<e.length;f++)null!=e[f]&&null!=e[f].node&&
+this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(n.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):k.container.focus()}))},AnimationWindow=function(a,c,f,d,b){function e(a){for(var b=[],c=0;c<a.length;c++){var d=D.view.getState(a[c]);if(null!=d){for(var e=D.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,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=E.view.getState(a[f]);null!=k&&null!=k.shape&&E.model.isEdge(k.cell)&&null!=k.absolutePoints&&1<k.absolutePoints.length?e.push(l(k)):null!=k&&E.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 q(){if(!K){var b=function(){if(D&&m<l.length){var a=l[m].split(" ");if(0<a.length)if("wait"==a[0]&&1<a.length)window.setTimeout(function(){m++;b()},parseFloat(a[1]));else{if(1<a.length){var d=f[a[1]];null!=d?"show"==a[0]?(E.setCellStyles("opacity","100",[d]),E.setCellStyles("noLabel",null,[d]),2<a.length&&"fade"==a[2]?g(e([d])):n([d])):
-"hide"==a[0]&&k(e([d])):console.log("cell not found",c,l[m])}m++;b()}}else K=!1};K=D=!0;E.getModel().clear();E.getModel().setRoot(E.cloneCells([a.editor.graph.getModel().getRoot()])[0]);E.maxFitScale=1;E.fit(8);E.center();E.getModel().beginUpdate();try{for(var c in E.getModel().cells){var d=E.getModel().cells[c];if(E.getModel().isVertex(d)||E.getModel().isEdge(d))E.setCellStyles("opacity","0",[d]),E.setCellStyles("noLabel","1",[d])}}finally{E.getModel().endUpdate()}var f=p(a.editor.graph.getModel().getRoot(),
-E.getModel().getRoot()),l=z.value.split("\n"),m=0;b()}}var u=document.createElement("table");u.style.width="100%";u.style.height="100%";var t=document.createElement("tbody"),v=document.createElement("tr"),y=document.createElement("td");y.style.width="140px";var x=document.createElement("td"),A=document.createElement("tr");A.style.height="40px";var B=document.createElement("td");B.setAttribute("colspan","2");var z=document.createElement("textarea");z.style.overflow="auto";z.style.width="100%";z.style.height=
-"100%";y.appendChild(z);var C=a.editor.graph.getModel().getRoot();null!=C.value&&"object"==typeof C.value&&(z.value=C.value.getAttribute("animation"));var F=document.createElement("div");F.style.border="1px solid lightGray";F.style.background="#ffffff";F.style.width="100%";F.style.height="100%";F.style.overflow="auto";mxEvent.disableContextMenu(F);x.appendChild(F);var E=new Graph(F);E.setEnabled(!1);E.setPanning(!0);E.foldingEnabled=!1;E.panningHandler.ignoreCell=!0;E.panningHandler.useLeftButtonForPanning=
-!0;E.minFitScale=null;E.maxFitScale=null;E.centerZoom=!0;var D=!1,K=!1,F=mxUtils.button("Fade In",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)z.value=z.value+"show "+b[c].id+" fade\n";z.value+="wait 1000\n"}});B.appendChild(F);F=mxUtils.button("Wipe In",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)z.value=z.value+"show "+b[c].id+"\n";z.value+="wait 1000\n"}});B.appendChild(F);F=mxUtils.button("Fade Out",
-function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)z.value=z.value+"hide "+b[c].id+"\n";z.value+="wait 1000\n"}});B.appendChild(F);F=mxUtils.button("Wait",function(){z.value+="wait 1000\n"});B.appendChild(F);F=mxUtils.button("Preview",function(){q()});B.appendChild(F);F=mxUtils.button("Stop",function(){D=!1;E.getModel().clear()});B.appendChild(F);F=mxUtils.button("Apply",function(){a.editor.graph.setAttributeForCell(C,"animation",z.value)});B.appendChild(F);
+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=D.view.getState(a[f]);null!=k&&null!=k.shape&&D.model.isEdge(k.cell)&&null!=k.absolutePoints&&1<k.absolutePoints.length?e.push(l(k)):null!=k&&D.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 q(){if(!K){var b=function(){if(E&&m<l.length){var a=l[m].split(" ");if(0<a.length)if("wait"==a[0]&&1<a.length)window.setTimeout(function(){m++;b()},parseFloat(a[1]));else{if(1<a.length){var d=f[a[1]];null!=d?"show"==a[0]?(D.setCellStyles("opacity","100",[d]),D.setCellStyles("noLabel",null,[d]),2<a.length&&"fade"==a[2]?g(e([d])):n([d])):
+"hide"==a[0]&&k(e([d])):console.log("cell not found",c,l[m])}m++;b()}}else K=!1};K=E=!0;D.getModel().clear();D.getModel().setRoot(D.cloneCells([a.editor.graph.getModel().getRoot()])[0]);D.maxFitScale=1;D.fit(8);D.center();D.getModel().beginUpdate();try{for(var c in D.getModel().cells){var d=D.getModel().cells[c];if(D.getModel().isVertex(d)||D.getModel().isEdge(d))D.setCellStyles("opacity","0",[d]),D.setCellStyles("noLabel","1",[d])}}finally{D.getModel().endUpdate()}var f=p(a.editor.graph.getModel().getRoot(),
+D.getModel().getRoot()),l=z.value.split("\n"),m=0;b()}}var u=document.createElement("table");u.style.width="100%";u.style.height="100%";var t=document.createElement("tbody"),v=document.createElement("tr"),y=document.createElement("td");y.style.width="140px";var x=document.createElement("td"),A=document.createElement("tr");A.style.height="40px";var B=document.createElement("td");B.setAttribute("colspan","2");var z=document.createElement("textarea");z.style.overflow="auto";z.style.width="100%";z.style.height=
+"100%";y.appendChild(z);var C=a.editor.graph.getModel().getRoot();null!=C.value&&"object"==typeof C.value&&(z.value=C.value.getAttribute("animation"));var F=document.createElement("div");F.style.border="1px solid lightGray";F.style.background="#ffffff";F.style.width="100%";F.style.height="100%";F.style.overflow="auto";mxEvent.disableContextMenu(F);x.appendChild(F);var D=new Graph(F);D.setEnabled(!1);D.setPanning(!0);D.foldingEnabled=!1;D.panningHandler.ignoreCell=!0;D.panningHandler.useLeftButtonForPanning=
+!0;D.minFitScale=null;D.maxFitScale=null;D.centerZoom=!0;var E=!1,K=!1,F=mxUtils.button("Fade In",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)z.value=z.value+"show "+b[c].id+" fade\n";z.value+="wait 1000\n"}});B.appendChild(F);F=mxUtils.button("Wipe In",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)z.value=z.value+"show "+b[c].id+"\n";z.value+="wait 1000\n"}});B.appendChild(F);F=mxUtils.button("Fade Out",
+function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)z.value=z.value+"hide "+b[c].id+"\n";z.value+="wait 1000\n"}});B.appendChild(F);F=mxUtils.button("Wait",function(){z.value+="wait 1000\n"});B.appendChild(F);F=mxUtils.button("Preview",function(){q()});B.appendChild(F);F=mxUtils.button("Stop",function(){E=!1;D.getModel().clear()});B.appendChild(F);F=mxUtils.button("Apply",function(){a.editor.graph.setAttributeForCell(C,"animation",z.value)});B.appendChild(F);
C=a.editor.graph.getModel().getRoot();v.appendChild(y);v.appendChild(x);t.appendChild(v);A.appendChild(B);t.appendChild(A);u.appendChild(t);this.window=new mxWindow("Animation",u,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==a.gitHub&&(g=mxResources.get("github"),k.src=IMAGE_PATH+"/github-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[g]));var l=document.createElement("input");l.setAttribute("type","checkbox");g=mxUtils.button(mxResources.get("authorize"),function(){d(l.checked)});g.insertBefore(k,g.firstChild);g.style.marginTop="6px";g.className="geBigButton";b.appendChild(e);b.appendChild(a);b.appendChild(g);f&&(f=document.createElement("p"),f.style.marginTop=
@@ -7238,14 +7239,14 @@ d?d.height:"";m.appendChild(u);k.appendChild(l);k.appendChild(m);g.appendChild(k
var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=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(q.value).length&&(d.width=Number(q.value)),0<mxUtils.trim(u.value).length&&
(d.height=Number(u.value))),f.getModel().setGeometry(c[b],d));0<mxUtils.trim(t.value).length&&f.setCellStyles(mxConstants.STYLE_ROTATION,Number(t.value),[c[b]])}}finally{f.getModel().endUpdate()}});mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&v.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(d),e.appendChild(v)):(e.appendChild(v),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!=u;)a=a.parentNode;var b=null;if(null!=a)for(var c=u.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function k(b,c,d,e,f,l,m,p,q){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=m||null==v[b]){var x=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=L.title&&0<L.title.length?L.title:mxResources.get("untitled"));
-I.style.color=null==L.title||0==L.title.length?"#d0d0d0":""};u.style.backgroundImage="";t.style.display="none";var C=f,D=l;if(f>a.maxImageSize||l>a.maxImageSize){var E=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=E;l*=E}C>D?(D=Math.round(100*D/C),C=100):(C=Math.round(100*C/D),D=100);var F=document.createElement("div");F.setAttribute("draggable","true");F.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";F.style.position="relative";F.style.cursor="move";
-mxUtils.setPrefixedStyle(F.style,"transition","transform .1s ease-in-out");if(null!=b){var K=document.createElement("img");K.setAttribute("src",B.convert(b));K.style.width=C+"px";K.style.height=D+"px";K.style.margin="10px";K.style.paddingBottom=Math.floor((100-D)/2)+"px";K.style.paddingLeft=Math.floor((100-C)/2)+"px";F.appendChild(K)}else if(null!=m){var J=a.stringToCells(a.editor.graph.decompress(m.xml));0<J.length&&(a.sidebar.createThumb(J,100,100,F,null,!0,!1),F.firstChild.style.display=mxClient.IS_QUIRKS?
-"inline":"inline-block",F.firstChild.style.cursor="")}var H=document.createElement("img");H.setAttribute("src",Editor.closeImage);H.setAttribute("border","0");H.setAttribute("title",mxResources.get("delete"));H.setAttribute("align","top");H.style.paddingTop="4px";H.style.marginLeft="-22px";H.style.cursor="pointer";mxEvent.addListener(H,"dragstart",function(a){mxEvent.consume(a)});null==b&&null!=m&&(H.style.position="relative");(function(a,b,c){mxEvent.addListener(H,"click",function(d){v[b]=null;for(var e=
-0;e<n.length;e++)if(null!=n[e].data&&n[e].data==b||null!=n[e].xml&&null!=c&&n[e].xml==c.xml){n.splice(e,1);break}F.parentNode.removeChild(a);0==n.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.display="");mxEvent.consume(d)});mxEvent.addListener(H,"dblclick",function(a){mxEvent.consume(a)})})(F,b,m);F.appendChild(H);F.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 L=null;null!=b?(L={data:b,w:f,h:l,title:q},null!=p&&(L.aspect=p),v[b]=K,n.push(L)):null!=m&&(m.aspect="fixed",n.push(m),L=m);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=A&&(A(),A=null,mxEvent.consume(a))});x();F.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});f=function(b){if(mxClient.IS_IOS||
+I.style.color=null==L.title||0==L.title.length?"#d0d0d0":""};u.style.backgroundImage="";t.style.display="none";var C=f,D=l;if(f>a.maxImageSize||l>a.maxImageSize){var F=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=F;l*=F}C>D?(D=Math.round(100*D/C),C=100):(C=Math.round(100*C/D),D=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";E.style.cursor="move";
+mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=b){var K=document.createElement("img");K.setAttribute("src",B.convert(b));K.style.width=C+"px";K.style.height=D+"px";K.style.margin="10px";K.style.paddingBottom=Math.floor((100-D)/2)+"px";K.style.paddingLeft=Math.floor((100-C)/2)+"px";E.appendChild(K)}else if(null!=m){var J=a.stringToCells(a.editor.graph.decompress(m.xml));0<J.length&&(a.sidebar.createThumb(J,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS?
+"inline":"inline-block",E.firstChild.style.cursor="")}var H=document.createElement("img");H.setAttribute("src",Editor.closeImage);H.setAttribute("border","0");H.setAttribute("title",mxResources.get("delete"));H.setAttribute("align","top");H.style.paddingTop="4px";H.style.marginLeft="-22px";H.style.cursor="pointer";mxEvent.addListener(H,"dragstart",function(a){mxEvent.consume(a)});null==b&&null!=m&&(H.style.position="relative");(function(a,b,c){mxEvent.addListener(H,"click",function(d){v[b]=null;for(var e=
+0;e<n.length;e++)if(null!=n[e].data&&n[e].data==b||null!=n[e].xml&&null!=c&&n[e].xml==c.xml){n.splice(e,1);break}E.parentNode.removeChild(a);0==n.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.display="");mxEvent.consume(d)});mxEvent.addListener(H,"dblclick",function(a){mxEvent.consume(a)})})(E,b,m);E.appendChild(H);E.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 L=null;null!=b?(L={data:b,w:f,h:l,title:q},null!=p&&(L.aspect=p),v[b]=K,n.push(L)):null!=m&&(m.aspect="fixed",n.push(m),L=m);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=A&&(A(),A=null,mxEvent.consume(a))});x();E.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)){var c=new FilenameDialog(a,L.title||"",mxResources.get("ok"),function(a){null!=a&&(L.title=a,x())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=I.getAttribute("contentEditable")){null!=A&&(A(),A=null);if(null==L.title||0==L.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);A=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";L.title=I.innerHTML;x()};mxEvent.consume(b)}};mxEvent.addListener(I,"click",f);mxEvent.addListener(F,"dblclick",f);u.appendChild(F);mxEvent.addListener(F,"dragstart",function(a){null==b&&null!=m&&(H.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=m.xml&&a.dataTransfer.setData("Text",m.xml);y=g(a);mxClient.IS_GC&&(F.style.opacity="0.9");
-window.setTimeout(function(){mxUtils.setPrefixedStyle(F.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(F,30);H.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(F,"dragend",function(a){"hidden"==H.style.visibility&&(H.style.visibility="",I.style.visibility="");y=null;mxUtils.setOpacity(F,100);mxUtils.setPrefixedStyle(F.style,"transform",null)})}else z||(z=!0,a.handleError({message:mxResources.get("fileExists")}));else{f=!1;try{if(null!=b&&"<mxlibrary"==b.substring(0,10)){D=
+"true");I.focus();document.execCommand("selectAll",!1,null);A=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";L.title=I.innerHTML;x()};mxEvent.consume(b)}};mxEvent.addListener(I,"click",f);mxEvent.addListener(E,"dblclick",f);u.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=m&&(H.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=m.xml&&a.dataTransfer.setData("Text",m.xml);y=g(a);mxClient.IS_GC&&(E.style.opacity="0.9");
+window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);H.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==H.style.visibility&&(H.style.visibility="",I.style.visibility="");y=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else z||(z=!0,a.handleError({message:mxResources.get("fileExists")}));else{f=!1;try{if(null!=b&&"<mxlibrary"==b.substring(0,10)){D=
mxUtils.parseXml(b);C=JSON.parse(mxUtils.getTextContent(D.documentElement));if(null!=C&&0<C.length)for(l=0;l<C.length;l++)null!=C[l].xml?k(null,null,0,0,0,0,C[l]):k(C[l].data,null,0,0,C[l].w,C[l].h,null,"fixed",C[l].title);a.spinner.stop();f=!0}}catch(Q){}f||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Q){}return null}function l(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function m(b){b.stopPropagation();b.preventDefault();
z=!1;x=g(b);if(null!=y)null!=x&&x<u.children.length?(n.splice(x>y?x-1:x,0,n.splice(y,1)[0]),u.insertBefore(u.children[y],u.children[x])):(n.push(n.splice(y,1)[0]),u.appendChild(u.children[y]));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," "));u.scrollTop=u.scrollHeight});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);u.scrollTop=u.scrollHeight})}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")+
@@ -7310,15 +7311,15 @@ 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 u=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 u.apply(this,arguments)}})();
-(function(){EditorUi.VERSION="6.2.4";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
-EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.enableLogging=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!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(p){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c=a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=
-null!==c.match("image/jpeg")}catch(n){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=
-function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),b=0;b<a.length;b++)"picker modal-dialog picker-dialog"==a[b].className&&(a[b].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return mxClient.IS_FF&&this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
-function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),e=d.spin;d.spin=function(c,f){var k=!1;this.active||(e.call(this,c),this.active=!0,null!=f&&(k=document.createElement("div"),k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize="9pt",k.style.padding="6px",
-k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,a)+"px",k.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),k.innerHTML=f+"...",c.appendChild(k),d.status=k,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(k.style.left=Math.round(Math.max(0,a-k.offsetWidth/
-2))+"px",k.style.top=Math.round(Math.max(0,b+70-k.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,f)}));this.stop();return a}),k=!0);return k};var f=d.stop;d.stop=function(){f.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=f;f+=b;return a.substring(c,f)}function e(a){a=d(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var f=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=e(a);var k=d(a,4);if(null!=b&&b(f-8,k,c))break;value=d(a,c);d(a,4);if("IEND"==k)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(n){}return!1};
+(function(){EditorUi.VERSION="6.2.5";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.enableLogging=!0;EditorUi.prototype.pdfPageExport=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!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(p){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c=
+a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(n){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};
+EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),b=0;b<a.length;b++)"picker modal-dialog picker-dialog"==a[b].className&&(a[b].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return mxClient.IS_FF&&this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};
+EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),e=d.spin;d.spin=function(c,f){var k=!1;this.active||(e.call(this,c),this.active=!0,null!=f&&(k=document.createElement("div"),k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize=
+"9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,a)+"px",k.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),k.innerHTML=f+"...",c.appendChild(k),d.status=k,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(k.style.left=Math.round(Math.max(0,
+a-k.offsetWidth/2))+"px",k.style.top=Math.round(Math.max(0,b+70-k.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,f)}));this.stop();return a}),k=!0);return k};var f=d.stop;d.stop=function(){f.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=f;f+=b;return a.substring(c,f)}function e(a){a=d(a,
+4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var f=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=e(a);var k=d(a,4);if(null!=b&&b(f-8,k,c))break;value=d(a,c);d(a,4);if("IEND"==k)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(n){}return!1};
var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("&lt;mxfile ");if(0<=d){var e=b.lastIndexOf("&lt;/mxfile&gt;");e>d&&(c=b.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),k=this.editor.extractGraphModel(f.documentElement,null!=this.pages),c=null!=k?mxUtils.getXml(k):""}catch(u){}return c};EditorUi.prototype.validateFileData=
function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+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")),
@@ -7337,87 +7338,87 @@ e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![end
!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&&null!=
b&&(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.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||
/(\.svg)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var k=this.getBaseFilename(),g=k+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(g,a,l,"text/xml")}else if("html"==a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,k),this.saveData(g,a,l,"text/html");
-else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a&&(g=k+".png"),this.saveRequest(g,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var k=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return k}catch(D){this.handleError(D)}}));else{var m=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var p=this.editor.graph.background;p==mxConstants.NONE&&(p=null);var q=this.editor.graph.getSvg(p,null,null,null,null,d);c&&this.editor.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=
-k+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),d)}}catch(z){this.handleError(z)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=0;k<this.pages.length;k++)if(this.pages[k]==
-this.currentPage){f="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+d+"&embedXml="+e+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();
-var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);null!=c&&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{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);
-a.addListener("contentChanged",this.descriptorChangedListener);this.descriptorChanged();a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus(mxResources.get("readOnly")));this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus());
-this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;if(this.enableLogging&&!this.isOffline())try{var e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e.src=f+"/log?msg=storageMode:"+encodeURIComponent(a.getMode())+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(u){}if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(u){}}catch(u){null!=
-window.console&&console.log("error in fileLoaded:",a,u);if(this.enableLogging&&!this.isOffline())try{e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"",e.src=f+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=u&&null!=u.message?":err:"+encodeURIComponent(u.message):"")+(null!=u&&null!=u.stack?"&stack="+encodeURIComponent(u.stack):"")}catch(t){}this.handleError(u,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!=c?this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,f,g){};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.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],k=f.data;if(null!=k){var k=this.convertDataUri(k),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
-"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+k,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(k=this.stringToCells(this.editor.graph.decompress(f.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;
-c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");g.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("align",
-"top");m.setAttribute("border","0");m.className="geButton";m.style.marginRight="1px";m.style.marginTop="-1px";l.appendChild(m);var x=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=x?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==k?k.setAttribute("title",mxResources.get("libraryTooltip")):
-k.removeAttribute("title")}));if(a.isEditable()){var A=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),z=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=m.cloneNode(!1),E.setAttribute("src",Editor.spinImage),E.setAttribute("title",mxResources.get("saving")),E.style.cursor="default",E.style.marginRight="2px",E.style.marginTop="-2px",l.insertBefore(E,
-l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),g.style.paddingRight=18*l.childNodes.length+"px")})):null==x&&(x=m.cloneNode(!1),x.setAttribute("src",IMAGE_PATH+"/download.png"),x.setAttribute("title",mxResources.get("save")),l.insertBefore(x,l.firstChild),mxEvent.addListener(x,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==
-LocalLibrary,!0);x.parentNode.removeChild(x);x=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,f){a=A.cloneCells(A.model.getTopmostCells(a));for(var g=0;g<a.length;g++){var l=A.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.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);z(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),F=mxUtils.bind(this,function(a){if(A.isSelectionEmpty())A.getRubberband().isActive()?(A.getRubberband().execute(a),A.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=A.getSelectionCells(),c=A.view.getBounds(b),d=A.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=A.view.translate.x;
-c.y-=A.view.translate.y;C(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",A.panningManager.stop(),A.autoScroll=!1,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!1),
-null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,A.panningManager.stop(),A.graphHandler.reset(),A.isMouseDown=!1,A.autoScroll=!0,F(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){A.isMouseDown&&
-null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",A.autoScroll=!0,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!0),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";
-a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.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,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
-this.convertDataUri(c),t=[new mxCell("",new mxGeometry(0,0,m,n),t)];t[0].vertex=!0;C(t,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var q=JSON.parse(mxUtils.getTextContent(c.documentElement));f(q,k);b=b.concat(q);z(a);this.spinner.stop();p=!0}catch(G){}else if("mxfile"==c.documentElement.nodeName)try{q=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),
-t=this.stringToCells(this.editor.graph.decompress(q)),C(t,new mxRectangle(0,0,m,n),a),p=!0}catch(G){}p||(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(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));
-m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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)})),l.insertBefore(c,l.firstChild));var E=null;mxEvent.addListener(m,"click",F)}g.appendChild(l);g.style.paddingRight=18*l.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"),k=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(f=mxResources.get("cancel"),k=function(){d();e.retry()}),"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 g=window.location.hash;null!=g&&"#G"==g.substring(0,2)&&(g=g.substring(2),a+=' <a href="https://drive.google.com/open?id='+g+'" target="_blank">'+mxResources.get("tryOpeningViaThisPage")+"</a>")}else e.code==App.ERROR_TIMEOUT?a=mxResources.get("timeout"):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,k)}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.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
-return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename,e=d.lastIndexOf(".");0<e&&(d=d.substring(0,e));e="jpeg"==c?"jpg":c;d+="."+e;a=this.createImageDataUri(a,b,c);this.saveData(d,e,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&
-8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(c),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=
-new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var f=document.createElement("a");if("undefined"!==typeof f.download||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));"undefined"!==typeof f.download?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);
-try{f.click(),window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.parentNode.removeChild(f)}catch(u){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=
-b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),k=0;k<e;++k){for(var g=1024*k,l=Math.min(g+1024,d),y=Array(l-g),x=0;g<l;++x,++g)y[x]=c[g].charCodeAt(0);f[k]=new Uint8Array(y)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e){e=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG)f=window.open("about:blank"),
-null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());else if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('<html><img src="data:'+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),f.document.close())}else f=window.open("data:"+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else e==App.MODE_DEVICE?
-this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(v){this.handleError(v)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e,null,null,4);this.showDialog(b.container,380,5>this.getServiceCount(!1)-1?270:390,!0,!0);b.init()};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,
-function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}))};EditorUi.prototype.saveRequest=function(a,b,c){var d=!mxClient.IS_IOS||!navigator.standalone;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var e=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||"_blank"==d?"0":"1");null!=e&&(d==App.MODE_DEVICE||"_blank"==d?e.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){this.spinner.spin(document.body,mxResources.get("saving"))&&
-e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),a,f,!0,d,c)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,d,null,null,4);this.showDialog(a.container,380,
-5>this.getServiceCount(!1)-1?270:390,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,g,t,v){if(this.spinner.spin(document.body,mxResources.get("export"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;k=b?null:this.editor.graph.background;k==mxConstants.NONE&&(k=null);null==k&&0==b&&(k="#ffffff");var l=this.editor.graph.getSvg(k,a,g,t,null,c);d&&this.editor.addSvgShadow(l);
-a=this.getCurrentFile();var m=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=m.lastIndexOf(".");0<a&&(m=m.substring(0,a));var m=m+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,v));var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,l,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,n,this.thumbImageCache)):n(l)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e){var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled",
-"disabled");a.appendChild(f);mxUtils.write(a,b);e||mxUtils.br(a);return f};EditorUi.prototype.addLinkSection=function(a,b){function c(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");
-d.style.width="100px";d.style.marginLeft="4px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&
-(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();g.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width=
-"22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,t){var k=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),
-e&&l.push("edit=_blank"),f&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&l.push("page="+a);break}a=!0;null!=g?c="#U"+encodeURIComponent(g):(k=this.getCurrentFile(),t||null==k||k.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
-(c="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,t,v,y,x){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=e);"auto"!==d&&(l.target=d);v||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||
-100==c||(l.zoom=c/100);c=[];g&&(c.push("pages"),l.resize=!0,null!=this.pages&&null!=this.currentPage&&(l.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),l.resize=!0);t&&c.push("layers");0<c.length&&(v&&c.push("lightbox"),l.toolbar=c.join(" "));y&&(l.edit=null!=a?a:"_blank");null!=a?l.url=a:l.xml=this.getFileData(!0,null,null,null,null,!g);b='<div class="mxgraph" style="'+(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(l))+
-'"></div>';k=0<k.length?"s="+k.join(";"):"";a=null!=a?"fetch="+encodeURIComponent(a):"";x(b,'<script type="text/javascript" src="'+(0<k.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1&"+k:"https://www.draw.io/embed2.js?"+k)+"&"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");
-mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value",
-"copy");g.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(l=document.createElement("a"),l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),
-g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),A=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var B=document.createElement("input");B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight=
-"12px";B.value="100%";e.appendChild(B);var z=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(e,mxResources.get("allPages"),g,!g),F=this.addCheckbox(e,mxResources.get("layers"),!0),E=this.addCheckbox(e,mxResources.get("lightbox"),!0),D=this.addCheckbox(e,mxResources.get("showEditButton"),!0);D.style.marginLeft="24px";D.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?D.removeAttribute("disabled"):D.setAttribute("disabled",
-"disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,A.checked,B.value,n.getTarget(),n.getColor(),z.checked,C.checked,F.checked,E.checked,D.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
-g.appendChild(k);var l=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941-how-to-publicly-publish-a-copy-of-your-draw-io-diagram";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384-how-to-publicly-publish-a-copy-of-your-draw-io-diagram-stored-in-google-drive",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);g.appendChild(m);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));
-m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var p=null,q=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),p=document.createElement("input"),
-p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",g.appendChild(p),mxUtils.write(g,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=d+"px",g.appendChild(q),mxUtils.br(g);var z=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var C=null;
-if(null==l||l.constructor!=window.DriveFile||b)C=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var F=this.addCheckbox(g,mxResources.get("lightbox"),!0),E=this.addCheckbox(g,mxResources.get("showEditButton"),!0);E.style.marginLeft="24px";var D=this.addCheckbox(g,mxResources.get("layers"),!0);D.style.marginLeft=E.style.marginLeft;D.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?(D.removeAttribute("disabled"),E.removeAttribute("disabled")):(D.setAttribute("disabled",
-"disabled"),E.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(z.getTarget(),z.getColor(),null==C?!0:C.checked,F.checked,E.checked,D.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):z.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,
-b,c){var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0);g.style.marginBottom="16px";a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!f.checked,
-g.checked)}),null,a,b);this.showDialog(a.container,300,146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=this.editor.graph,l=280,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(m);mxUtils.write(g,mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";
-n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";g.appendChild(n);mxUtils.write(g,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value="0";g.appendChild(p);mxUtils.br(g);var q=this.addCheckbox(g,mxResources.get("transparentBackground"),k.background==mxConstants.NONE||null==k.background),z=this.addCheckbox(g,mxResources.get("selectionOnly"),
-!1,k.isSelectionEmpty()),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");f&&(g.appendChild(C),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),l+=26);k.isSelectionEmpty()?C.setAttribute("disabled","disabled"):(C.setAttribute("checked","checked"),C.defaultChecked=!0);var F=this.addCheckbox(g,mxResources.get("shadow"),k.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type",
-"checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(g.appendChild(E),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),l+=26);var D=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0);a=null!=this.pages&&1<this.pages.length;var K=K=this.addCheckbox(g,mxResources.get("allPages"),a,!a);K.style.marginLeft="24px";K.style.marginBottom="16px";mxEvent.addListener(D,"change",function(){D.checked?K.removeAttribute("disabled"):K.setAttribute("disabled",
-"disabled")});c=new CustomDialog(this,g,mxUtils.bind(this,function(){e(n.value,q.checked,!z.checked,F.checked,D.checked,E.checked,p.value,C.checked,!K.checked)}),null,c,d);this.showDialog(c.container,320,l,!0,!0);n.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showExportJpgDialog=function(a,b){var c=document.createElement("div");c.style.whiteSpace="nowrap";var d=this.editor.graph,e=document.createElement("h3");
-mxUtils.write(e,mxResources.get("formatJpg"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(e);mxUtils.write(c,mxResources.get("zoom")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginRight="16px";f.style.width="60px";f.style.marginLeft="4px";f.style.marginBottom="4px";f.value="100%";c.appendChild(f);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type",
-"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=document.createElement("input");l.style.marginTop="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");c.appendChild(l);mxUtils.write(c,mxResources.get("crop"));mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=
-!0);var y=this.addCheckbox(c,mxResources.get("shadow"),d.shadowVisible),d=document.createElement("input");d.style.marginTop="16px";d.style.marginRight="8px";d.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||d.setAttribute("disabled","disabled");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,!k.checked,y.checked,g.value,l.checked)}),null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||
-mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(k)}var l=this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,
-!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addCheckbox(f,mxResources.get("showEditButton"),!0);B.style.marginLeft="24px";var z=1<g.model.getChildCount(g.model.getRoot()),C=this.addCheckbox(f,mxResources.get("layers"),z,!z);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?(z&&C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled",
-"disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,B.checked,C.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=k+".png":"jpeg"==a&&(g=k+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var k=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return k}catch(E){this.handleError(E)}}));else{var m=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):
+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var p=this.editor.graph.background;p==mxConstants.NONE&&(p=null);var q=this.editor.graph.getSvg(p,null,null,null,null,d);c&&this.editor.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a))})))}else g=k+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),d)}}catch(z){this.handleError(z)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=
+0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){f="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+d+"&embedXml="+e+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();
+this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);null!=c&&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{this.setCurrentFile(a);a.addListener("descriptorChanged",
+this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);this.descriptorChanged();a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus(mxResources.get("readOnly")));this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==
+window.top&&window.focus());this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;if(this.enableLogging&&!this.isOffline()&&null!=a.getMode())try{var e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e.src=f+"/log?msg=storageMode:"+encodeURIComponent(a.getMode())+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(u){}if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),
+mode:a.getMode()})}catch(u){}}catch(u){null!=window.console&&console.log("error in fileLoaded:",a,u);if(this.enableLogging&&!this.isOffline())try{e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"",e.src=f+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=u&&null!=u.message?":err:"+encodeURIComponent(u.message):"")+(null!=u&&null!=u.stack?"&stack="+encodeURIComponent(u.stack):"")}catch(t){}this.handleError(u,
+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!=c?this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,f,g){};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.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],k=f.data;if(null!=k){var k=this.convertDataUri(k),
+g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+k,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(k=this.stringToCells(this.editor.graph.decompress(f.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,
+a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");g.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",
+mxResources.get("close"));m.setAttribute("align","top");m.setAttribute("border","0");m.className="geButton";m.style.marginRight="1px";m.style.marginTop="-1px";l.appendChild(m);var x=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=x?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==
+k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var A=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),z=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=D&&null!=D.parentNode&&D.parentNode.removeChild(D),D=m.cloneNode(!1),D.setAttribute("src",Editor.spinImage),D.setAttribute("title",mxResources.get("saving")),D.style.cursor="default",
+D.style.marginRight="2px",D.style.marginTop="-2px",l.insertBefore(D,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=D&&null!=D.parentNode&&(D.parentNode.removeChild(D),g.style.paddingRight=18*l.childNodes.length+"px")})):null==x&&(x=m.cloneNode(!1),x.setAttribute("src",IMAGE_PATH+"/download.png"),x.setAttribute("title",mxResources.get("save")),l.insertBefore(x,l.firstChild),mxEvent.addListener(x,"click",mxUtils.bind(this,
+function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);x.parentNode.removeChild(x);x=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,f){a=A.cloneCells(A.model.getTopmostCells(a));for(var g=0;g<a.length;g++){var l=A.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.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);z(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),F=mxUtils.bind(this,function(a){if(A.isSelectionEmpty())A.getRubberband().isActive()?(A.getRubberband().execute(a),A.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=A.getSelectionCells(),
+c=A.view.getBounds(b),d=A.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=A.view.translate.x;c.y-=A.view.translate.y;C(b,c)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",
+A.panningManager.stop(),A.autoScroll=!1,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!1),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.panningManager&&null!=A.graphHandler&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,A.panningManager.stop(),A.graphHandler.reset(),A.isMouseDown=!1,A.autoScroll=
+!0,F(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){A.isMouseDown&&null!=A.graphHandler.shape&&(A.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",A.autoScroll=!0,null!=A.graphHandler.guide&&A.graphHandler.guide.setVisible(!0),null!=A.graphHandler.hint&&(A.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,
+"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.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,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),t=[new mxCell("",new mxGeometry(0,0,m,n),t)];t[0].vertex=!0;C(t,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var q=JSON.parse(mxUtils.getTextContent(c.documentElement));
+f(q,k);b=b.concat(q);z(a);this.spinner.stop();p=!0}catch(G){}else if("mxfile"==c.documentElement.nodeName)try{q=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),t=this.stringToCells(this.editor.graph.decompress(q)),C(t,new mxRectangle(0,0,m,n),a),p=!0}catch(G){}p||(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(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);
+m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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)})),l.insertBefore(c,l.firstChild));var D=null;mxEvent.addListener(m,
+"click",F)}g.appendChild(l);g.style.paddingRight=18*l.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"),k=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&
+(f=mxResources.get("cancel"),k=function(){d();e.retry()}),"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 g=window.location.hash;null!=g&&"#G"==
+g.substring(0,2)&&(g=g.substring(2),a+=' <a href="https://drive.google.com/open?id='+g+'" target="_blank">'+mxResources.get("tryOpeningViaThisPage")+"</a>")}else e.code==App.ERROR_TIMEOUT?a=mxResources.get("timeout"):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,k)}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.createImageDataUri=
+function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename,e=d.lastIndexOf(".");0<e&&(d=d.substring(0,e));e="jpeg"==c?"jpg":c;d+="."+e;a=this.createImageDataUri(a,b,c);this.saveData(d,
+e,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(c),
+navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var f=document.createElement("a");if("undefined"!==
+typeof f.download||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));"undefined"!==typeof f.download?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{f.click(),window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.parentNode.removeChild(f)}catch(u){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,
+a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),k=0;k<e;++k){for(var g=1024*k,l=Math.min(g+1024,d),y=Array(l-g),x=0;g<l;++x,++g)y[x]=c[g].charCodeAt(0);f[k]=new Uint8Array(y)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e){e=!mxClient.IS_IOS||!navigator.standalone;
+b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG)f=window.open("about:blank"),null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());else if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('<html><img src="data:'+c+(d?";base64,"+a:";charset=utf8,"+
+encodeURIComponent(a))+'"/></html>'),f.document.close())}else f=window.open("data:"+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(v){this.handleError(v)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e,null,null,4);this.showDialog(b.container,
+380,5>this.getServiceCount(!1)-1?270:390,!0,!0);b.init()};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}))};EditorUi.prototype.saveRequest=function(a,b,c){var d=!mxClient.IS_IOS||!navigator.standalone;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var e=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||
+"_blank"==d?"0":"1");null!=e&&(d==App.MODE_DEVICE||"_blank"==d?e.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),a,f,!0,d,c)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();
+this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,d,null,null,4);this.showDialog(a.container,380,5>this.getServiceCount(!1)-1?270:390,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,g,t,v){if(this.spinner.spin(document.body,mxResources.get("export"))){var k=this.editor.graph.isSelectionEmpty();
+c=null!=c?c:k;k=b?null:this.editor.graph.background;k==mxConstants.NONE&&(k=null);null==k&&0==b&&(k="#ffffff");var l=this.editor.graph.getSvg(k,a,g,t,null,c);d&&this.editor.addSvgShadow(l);a=this.getCurrentFile();var m=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=m.lastIndexOf(".");0<a&&(m=m.substring(0,a));var m=m+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,v));var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,l,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,n,this.thumbImageCache)):n(l)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e){var f=document.createElement("input");
+f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");a.appendChild(f);mxUtils.write(a,b);e||mxUtils.br(a);return f};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="4px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");
+e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();k.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,t){var k=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+
+a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),e&&l.push("edit=_blank"),f&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&l.push("page="+a);break}a=!0;null!=g?c="#U"+encodeURIComponent(g):(k=this.getCurrentFile(),t||null==k||k.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,
+null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,t,v,y,x){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=e);"auto"!==
+d&&(l.target=d);v||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(l.zoom=c/100);c=[];g&&(c.push("pages"),l.resize=!0,null!=this.pages&&null!=this.currentPage&&(l.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),l.resize=!0);t&&c.push("layers");0<c.length&&(v&&c.push("lightbox"),l.toolbar=c.join(" "));y&&(l.edit=null!=a?a:"_blank");null!=a?l.url=a:l.xml=this.getFileData(!0,null,null,null,null,!g);b='<div class="mxgraph" style="'+(f?"max-width:100%;":
+"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(l))+'"></div>';k=0<k.length?"s="+k.join(";"):"";a=null!=a?"fetch="+encodeURIComponent(a):"";x(b,'<script type="text/javascript" src="'+(0<k.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1&"+k:"https://www.draw.io/embed2.js?"+k)+"&"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=
+function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value",
+"url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");f=g.cloneNode(!0);f.setAttribute("value","copy");k.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(l);mxUtils.br(k);k.appendChild(g);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));k.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(l=document.createElement("a"),
+l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),k.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");e.appendChild(k);var n=this.addLinkSection(e),A=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var B=document.createElement("input");
+B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";e.appendChild(B);var z=this.addCheckbox(e,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(e,mxResources.get("allPages"),k,!k),F=this.addCheckbox(e,mxResources.get("layers"),!0),D=this.addCheckbox(e,mxResources.get("lightbox"),!0),E=this.addCheckbox(e,mxResources.get("showEditButton"),!0);E.style.marginLeft="24px";E.style.marginBottom=
+"16px";mxEvent.addListener(D,"change",function(){D.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(g.checked?c:null,A.checked,B.value,n.getTarget(),n.getColor(),z.checked,C.checked,F.checked,D.checked,E.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var k=document.createElement("div");k.style.whiteSpace="nowrap";var g=document.createElement("h3");
+mxUtils.write(g,a||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(g);var l=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941-how-to-publicly-publish-a-copy-of-your-draw-io-diagram";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var g="https://desk.draw.io/support/solutions/articles/16000039384-how-to-publicly-publish-a-copy-of-your-draw-io-diagram-stored-in-google-drive",m=document.createElement("div");
+m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);k.appendChild(m);n=document.createElement("a");n.style.paddingLeft=
+"12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,
+300,80,!0,!1);a.init()}))}))}var p=null,q=null;if(null!=c||null!=d)a+=30,mxUtils.write(k,mxResources.get("width")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",k.appendChild(p),mxUtils.write(k,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom=
+"10px",q.value=d+"px",k.appendChild(q),mxUtils.br(k);var z=this.addLinkSection(k,f);c=null!=this.pages&&1<this.pages.length;var C=null;if(null==l||l.constructor!=window.DriveFile||b)C=this.addCheckbox(k,mxResources.get("allPages"),c,!c);var F=this.addCheckbox(k,mxResources.get("lightbox"),!0),D=this.addCheckbox(k,mxResources.get("showEditButton"),!0);D.style.marginLeft="24px";var E=this.addCheckbox(k,mxResources.get("layers"),!0);E.style.marginLeft=D.style.marginLeft;E.style.marginBottom="16px";mxEvent.addListener(F,
+"change",function(){F.checked?(E.removeAttribute("disabled"),D.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"))});b=new CustomDialog(this,k,mxUtils.bind(this,function(){e(z.getTarget(),z.getColor(),null==C?!0:C.checked,F.checked,D.checked,E.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+p.select():document.execCommand("selectAll",!1,null)):z.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(f);var k=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),
+!0);null!=g&&(g.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!k.checked,null!=g?g.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f){var k=document.createElement("div");k.style.whiteSpace="nowrap";var g=this.editor.graph,l=280,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";k.appendChild(m);mxUtils.write(k,
+mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";k.appendChild(n);mxUtils.write(k,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value="0";k.appendChild(p);mxUtils.br(k);var q=this.addCheckbox(k,mxResources.get("transparentBackground"),
+g.background==mxConstants.NONE||null==g.background),z=this.addCheckbox(k,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");f&&(k.appendChild(C),mxUtils.write(k,mxResources.get("crop")),mxUtils.br(k),l+=26);g.isSelectionEmpty()?C.setAttribute("disabled","disabled"):(C.setAttribute("checked","checked"),C.defaultChecked=!0);var F=this.addCheckbox(k,mxResources.get("shadow"),
+g.shadowVisible),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||D.setAttribute("disabled","disabled");b&&(k.appendChild(D),mxUtils.write(k,mxResources.get("embedImages")),mxUtils.br(k),l+=26);var E=this.addCheckbox(k,mxResources.get("includeCopyOfMyDiagram"),!0);a=null!=this.pages&&1<this.pages.length;var K=K=this.addCheckbox(k,mxResources.get("allPages"),a,!a);K.style.marginLeft="24px";
+K.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")});c=new CustomDialog(this,k,mxUtils.bind(this,function(){e(n.value,q.checked,!z.checked,F.checked,E.checked,D.checked,p.value,C.checked,!K.checked)}),null,c,d);this.showDialog(c.container,320,l,!0,!0);n.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showExportJpgDialog=
+function(a,b){var c=document.createElement("div");c.style.whiteSpace="nowrap";var d=this.editor.graph,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatJpg"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(e);mxUtils.write(c,mxResources.get("zoom")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginRight="16px";f.style.width="60px";f.style.marginLeft="4px";f.style.marginBottom="4px";f.value="100%";
+c.appendChild(f);mxUtils.write(c,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value="0";c.appendChild(k);mxUtils.br(c);var g=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=document.createElement("input");l.style.marginTop="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");c.appendChild(l);mxUtils.write(c,mxResources.get("crop"));
+mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=!0);var y=this.addCheckbox(c,mxResources.get("shadow"),d.shadowVisible),d=document.createElement("input");d.style.marginTop="16px";d.style.marginRight="8px";d.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||d.setAttribute("disabled","disabled");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,!g.checked,y.checked,k.value,l.checked)}),
+null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var k=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(g)}var l=
+this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),k.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addCheckbox(f,mxResources.get("showEditButton"),!0);B.style.marginLeft="24px";var z=1<k.model.getChildCount(k.model.getRoot()),C=this.addCheckbox(f,mxResources.get("layers"),z,!z);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?(z&&
+C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,B.checked,C.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');g('<img src="'+b+'"'+n+(""!=m?' style="'+m+'"':"")+k+"/>")}var l=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");k(a)}),null,null,null,mxUtils.bind(this,function(a){t({message:mxResources.get("unknownError")})}),
null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+m+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?k("data:image/png;base64,"+n.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};
EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.graph.getSvg(),l=k.getElementsByTagName("a");if(null!=l)for(var m=0;m<l.length;m++){var n=l[m].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==l[m].getAttribute("target")&&l[m].removeAttribute("target")}d&&k.setAttribute("content",this.getFileData(!0));b&&this.editor.addSvgShadow(k);if(c){var p=" ",q="";d&&(p="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
@@ -7427,13 +7428,13 @@ EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.grap
a);null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,
c,d,e,f,g,t,v){v=null!=v?v:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,t):null,v)}catch(A){"Invalid image"==A.message?this.downloadFile(v):this.handleError(A)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();
this.handleError(a)}),null,c,a||1,b,d,null,null,f,g)}catch(x){this.spinner.stop(),this.handleError(x)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,t,v,y,x,A,B,z){f=null!=f?f:!0;A=null!=A?A:this.editor.graph;B=null!=B?B:0;var k=v?null:A.background;k==mxConstants.NONE&&(k=null);null==k&&(k=d);null==k&&0==v&&(k="#ffffff");this.convertImages(A.getSvg(k,null,null,z,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")),l=parseInt(c.getAttribute("height"));t=null!=t?t:1;null!=b&&(t=f?Math.min(1,Math.min(3*b/(4*l),b/g)):b/g);g=Math.ceil(t*g)+2*B;l=Math.ceil(t*l)+2*B;e.setAttribute("width",g);e.setAttribute("height",l);var m=e.getContext("2d");null!=k&&(m.beginPath(),m.rect(0,0,g,l),m.fillStyle=k,m.fill());m.scale(t,t);m.drawImage(d,B/t,B/t);a(e)});d.onerror=function(a){null!=e&&e(a)};try{y&&this.editor.addSvgShadow(c),this.convertMath(A,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(D){null!=
-e&&e(D)}}),c,x)};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?"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=
-c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),l=0;l<k.length;l++)mxUtils.bind(this,function(c){var k=d.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var l=f[k];null==l?(e++,this.convertImageToDataUri(k,function(d){null!=d&&(f[k]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(k[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.isCorsEnabledForUrl=function(a){return"https?://raw.githubusercontent.com/"===a.substring(0,
+g=parseInt(c.getAttribute("width")),l=parseInt(c.getAttribute("height"));t=null!=t?t:1;null!=b&&(t=f?Math.min(1,Math.min(3*b/(4*l),b/g)):b/g);g=Math.ceil(t*g)+2*B;l=Math.ceil(t*l)+2*B;e.setAttribute("width",g);e.setAttribute("height",l);var m=e.getContext("2d");null!=k&&(m.beginPath(),m.rect(0,0,g,l),m.fillStyle=k,m.fill());m.scale(t,t);m.drawImage(d,B/t,B/t);a(e)});d.onerror=function(a){null!=e&&e(a)};try{y&&this.editor.addSvgShadow(c),this.convertMath(A,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(E){null!=
+e&&e(E)}}),c,x)};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?"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c));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,k){for(var g=a.getElementsByTagName(c),l=0;l<g.length;l++)mxUtils.bind(this,function(c){var g=d.convert(c.getAttribute(k));if(null!=g&&"data:"!=g.substring(0,5)){var l=f[g];null==l?(e++,this.convertImageToDataUri(g,function(d){null!=d&&(f[g]=d,c.setAttribute(k,d));e--;0==e&&b(a)})):c.setAttribute(k,l)}})(g[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.isCorsEnabledForUrl=function(a){return"https?://raw.githubusercontent.com/"===a.substring(0,
34)||/^https?:\/\/.*\.github\.io\//.test(a)||/^https?:\/\/(.*\.)?rawgit\.com\//.test(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 k=mxUtils.parseXml(a),l=this.editor.extractGraphModel(k.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var m=l.getElementsByTagName("diagram");if(1==m.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){g.model.beginUpdate();try{for(var n=0;n<m.length;n++){var p=this.updatePageRoot(new DiagramPage(m[n])),
B=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[B+1]));g.model.execute(new ChangePage(this,p,p,B))}}finally{g.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var z=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,z);var C=z.getChildCount(z.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(n=0;n<C;n++){var F=z.getChildAt(z.getRoot(),n);if(1!=C||g.isCellLocked(g.getDefaultParent()))F=g.importCells([F],0,0,g.model.getRoot(),
-null,a)[0],E=g.model.getChildren(F),g.moveCells(E,b,c),f=f.concat(E);else var E=z.getChildren(F),f=f.concat(g.importCells(E,b,c,g.getDefaultParent(),null,a))}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(K){throw e||this.handleError(K,mxResources.get("invalidOrMissingFile")),K;}return f};EditorUi.prototype.insertLucidChart=function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,
+null,a)[0],D=g.model.getChildren(F),g.moveCells(D,b,c),f=f.concat(D);else var D=z.getChildren(F),f=f.concat(g.importCells(D,b,c,g.getDefaultParent(),null,a))}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(K){throw e||this.handleError(K,mxResources.get("invalidOrMissingFile")),K;}return f};EditorUi.prototype.insertLucidChart=function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,
b,c,d)}catch(q){}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(e,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("/js/diagramly/Extensions.js",e):mxscript("/js/extensions.min.js",e))};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&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var k=this.extractGraphModelFromPng(a),l=this.importXml(k,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(k=null,"data:image/svg+xml;base64,"==a.substring(0,
26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1)),l=this.importXml(k,b,c,f,!0),0<l.length)return l}catch(x){}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=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
@@ -7500,26 +7501,26 @@ mxResources.get("draftFound",[l.name||this.defaultFilename]),m,mxUtils.bind(this
try{m.init()}catch(K){g.postMessage(JSON.stringify({event:"draft",error:K.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();m=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=l.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(m.container,620,440,!0,!1,mxUtils.bind(this,
function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxResources.get(l.messageKey)):null!=l.message&&this.editor.setStatus(l.message);null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var n=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==
l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var p=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var t=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=l.format;b.xml=encodeURIComponent(p);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var q=this.editor.graph;if(null!=this.pages&&this.currentPage!=
-this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),u=q.getGlobalVariable,E=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?E.getName():"pagenumber"==a?1:u.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(E.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);
+this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),u=q.getGlobalVariable,D=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?D.getName():"pagenumber"==a?1:u.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(D.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);
t(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200<=a.getStatus()&&299>=a.getStatus()&&t(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=l.xml&&0<l.xml.length&&this.setFileData(l.xml);n=this.createLoadMessage("export");
if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))m=this.getXmlFileData(),n.xml=mxUtils.getXml(m),n.data=this.getFileData(null,null,!0,null,null,null,m),n.format=l.format;else if("html"==l.format)p=this.editor.getGraphXml(),n.data=this.getHtml(p,this.editor.graph),n.xml=mxUtils.getXml(p),n.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);n.xml=this.getFileData(!0);n.format="svg";
if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==l.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(m),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);
this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(n),"*")}));return}m="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(m));n.data=this.createSvgDataUri(m)}g.postMessage(JSON.stringify(n),"*")}return}if("load"==l.action)d=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified),null!=l.saveAndExit&&null==urlParams.saveAndExit&&
(urlParams.saveAndExit=l.saveAndExit),null!=l.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,l.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(m)),l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.xml&&"data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):
-l.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}l=k(l);c=!0;try{a(l,f)}catch(K){this.handleError(K)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var D=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=D();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=D();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;
+l.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}l=k(l);c=!0;try{a(l,f)}catch(K){this.handleError(K)}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",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"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight=
"20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),
-null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,f="auto",g="auto",k=40,v=40,y=0,x=this.editor.graph;x.getGraphBounds();for(var A=function(){x.setSelectionCells(Z);x.scrollCellToVisible(x.getSelectionCell())},B=x.getFreeInsertPoint(),z=B.x,C=B.y,B=C,F=null,E="auto",D=[],K=null,H=null,J=0;J<b.length&&
-"#"==b[J].charAt(0);){a=b[J];for(J++;J<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[J].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[J].substring(1)),J++;if("#"!=a.charAt(1)){var I=a.indexOf(":");if(0<I){var L=mxUtils.trim(a.substring(1,I)),M=mxUtils.trim(a.substring(I+1));"label"==L?F=x.sanitizeHtml(M):"style"==L?e=M:"width"==L?f=M:"height"==L?g=M:"ignore"==L?H=M.split(","):"connect"==L?D.push(JSON.parse(M)):"link"==L?K=M:"padding"==L?y=parseFloat(M):"edgespacing"==L?k=parseFloat(M):"nodespacing"==
-L?v=parseFloat(M):"layout"==L&&(E=M)}}}var U=this.editor.csvToArray(b[J]);null==F&&(F="%"+U[0]+"%");if(null!=D)for(var V=0;V<D.length;V++)null==d[D[V].to]&&(d[D[V].to]={});x.model.beginUpdate();try{for(a=J+1;a<b.length;a++){var O=this.editor.csvToArray(b[a]);if(O.length==U.length){var G=new mxCell(F,new mxGeometry(z,B,0,0),e||"whiteSpace=wrap;html=1;");G.vertex=!0;for(var W=0;W<O.length;W++)x.setAttributeForCell(G,U[W],O[W]);x.setAttributeForCell(G,"placeholders","1");G.style=x.replacePlaceholders(G,
-G.style);for(V=0;V<D.length;V++)d[D[V].to][G.getAttribute(D[V].to)]=G;null!=K&&"link"!=K&&(x.setLinkForCell(G,G.getAttribute(K)),x.setAttributeForCell(G,K,null));var R=this.editor.graph.getPreferredSizeForCell(G);G.geometry.width="auto"==f?R.width+y:parseFloat(f);G.geometry.height="auto"==g?R.height+y:parseFloat(g);B+=G.geometry.height+v;c.push(x.addCell(G))}}null==e&&x.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var ca=c.slice(),Z=c.slice(),V=0;V<D.length;V++){var P=D[V];for(a=0;a<
+null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,f="auto",g="auto",k=40,v=40,y=0,x=this.editor.graph;x.getGraphBounds();for(var A=function(){x.setSelectionCells(Z);x.scrollCellToVisible(x.getSelectionCell())},B=x.getFreeInsertPoint(),z=B.x,C=B.y,B=C,F=null,D="auto",E=[],K=null,H=null,J=0;J<b.length&&
+"#"==b[J].charAt(0);){a=b[J];for(J++;J<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[J].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[J].substring(1)),J++;if("#"!=a.charAt(1)){var I=a.indexOf(":");if(0<I){var L=mxUtils.trim(a.substring(1,I)),M=mxUtils.trim(a.substring(I+1));"label"==L?F=x.sanitizeHtml(M):"style"==L?e=M:"width"==L?f=M:"height"==L?g=M:"ignore"==L?H=M.split(","):"connect"==L?E.push(JSON.parse(M)):"link"==L?K=M:"padding"==L?y=parseFloat(M):"edgespacing"==L?k=parseFloat(M):"nodespacing"==
+L?v=parseFloat(M):"layout"==L&&(D=M)}}}var U=this.editor.csvToArray(b[J]);null==F&&(F="%"+U[0]+"%");if(null!=E)for(var V=0;V<E.length;V++)null==d[E[V].to]&&(d[E[V].to]={});x.model.beginUpdate();try{for(a=J+1;a<b.length;a++){var O=this.editor.csvToArray(b[a]);if(O.length==U.length){var G=new mxCell(F,new mxGeometry(z,B,0,0),e||"whiteSpace=wrap;html=1;");G.vertex=!0;for(var W=0;W<O.length;W++)x.setAttributeForCell(G,U[W],O[W]);x.setAttributeForCell(G,"placeholders","1");G.style=x.replacePlaceholders(G,
+G.style);for(V=0;V<E.length;V++)d[E[V].to][G.getAttribute(E[V].to)]=G;null!=K&&"link"!=K&&(x.setLinkForCell(G,G.getAttribute(K)),x.setAttributeForCell(G,K,null));var R=this.editor.graph.getPreferredSizeForCell(G);G.geometry.width="auto"==f?R.width+y:parseFloat(f);G.geometry.height="auto"==g?R.height+y:parseFloat(g);B+=G.geometry.height+v;c.push(x.addCell(G))}}null==e&&x.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var ca=c.slice(),Z=c.slice(),V=0;V<E.length;V++){var P=E[V];for(a=0;a<
c.length;a++){var G=c[a],N=G.getAttribute(P.from);if(null!=N){x.setAttributeForCell(G,P.from,null);for(var Q=N.split(","),W=0;W<Q.length;W++){var X=d[P.to][Q[W]];null!=X&&(Z.push(x.insertEdge(null,null,P.label||"",P.invert?X:G,P.invert?G:X,P.style||x.createCurrentEdgeStyle())),mxUtils.remove(P.invert?G:X,ca))}}}}if(null!=H)for(a=0;a<c.length;a++)for(G=c[a],W=0;W<H.length;W++)x.setAttributeForCell(G,mxUtils.trim(H[W]),null);var da=new mxParallelEdgeLayout(x);da.spacing=k;var ea=function(){da.execute(x.getDefaultParent());
-for(var a=0;a<c.length;a++){var b=x.getCellGeometry(c[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==f&&(b.width=Math.round(x.snap(b.width)));"auto"==g&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==E){var S=new mxCircleLayout(x);S.resetEdges=!1;var aa=S.isVertexIgnored;S.isVertexIgnored=function(a){return aa.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){S.execute(x.getDefaultParent());ea()},!0,A);A=null}else if("horizontaltree"==E||"verticaltree"==
-E||"auto"==E&&Z.length==2*c.length-1&&1==ca.length){x.view.validate();var ba=new mxCompactTreeLayout(x,"horizontaltree"==E);ba.levelDistance=v;ba.edgeRouting=!1;this.executeLayout(function(){ba.execute(x.getDefaultParent(),0<ca.length?ca[0]:null)},!0,A);A=null}else if("horizontalflow"==E||"verticalflow"==E||"auto"==E&&1==ca.length){x.view.validate();var T=new mxHierarchicalLayout(x,"horizontalflow"==E?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);T.intraCellSpacing=v;this.executeLayout(function(){T.execute(x.getDefaultParent(),
-Z);x.moveCells(Z,z,C)},!0,A);A=null}else if("organic"==E||"auto"==E&&Z.length>c.length){x.view.validate();var Y=new mxFastOrganicLayout(x);Y.forceConstant=3*v;Y.resetEdges=!1;var ha=Y.isVertexIgnored;Y.isVertexIgnored=function(a){return ha.apply(this,arguments)||0>mxUtils.indexOf(c,a)};da=new mxParallelEdgeLayout(x);da.spacing=k;this.executeLayout(function(){Y.execute(x.getDefaultParent());ea()},!0,A);A=null}this.hideDialog()}finally{x.model.endUpdate()}null!=A&&A()}}catch(fa){this.handleError(fa)}};
+for(var a=0;a<c.length;a++){var b=x.getCellGeometry(c[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==f&&(b.width=Math.round(x.snap(b.width)));"auto"==g&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==D){var S=new mxCircleLayout(x);S.resetEdges=!1;var aa=S.isVertexIgnored;S.isVertexIgnored=function(a){return aa.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){S.execute(x.getDefaultParent());ea()},!0,A);A=null}else if("horizontaltree"==D||"verticaltree"==
+D||"auto"==D&&Z.length==2*c.length-1&&1==ca.length){x.view.validate();var ba=new mxCompactTreeLayout(x,"horizontaltree"==D);ba.levelDistance=v;ba.edgeRouting=!1;this.executeLayout(function(){ba.execute(x.getDefaultParent(),0<ca.length?ca[0]:null)},!0,A);A=null}else if("horizontalflow"==D||"verticalflow"==D||"auto"==D&&1==ca.length){x.view.validate();var T=new mxHierarchicalLayout(x,"horizontalflow"==D?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);T.intraCellSpacing=v;this.executeLayout(function(){T.execute(x.getDefaultParent(),
+Z);x.moveCells(Z,z,C)},!0,A);A=null}else if("organic"==D||"auto"==D&&Z.length>c.length){x.view.validate();var Y=new mxFastOrganicLayout(x);Y.forceConstant=3*v;Y.resetEdges=!1;var ha=Y.isVertexIgnored;Y.isVertexIgnored=function(a){return ha.apply(this,arguments)||0>mxUtils.indexOf(c,a)};da=new mxParallelEdgeLayout(x);da.spacing=k;this.executeLayout(function(){Y.execute(x.getDefaultParent());ea()},!0,A);A=null}this.hideDialog()}finally{x.model.endUpdate()}null!=A&&A()}}catch(fa){this.handleError(fa)}};
EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};var e=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=e.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-
2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var f=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return f.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&
@@ -7681,9 +7682,9 @@ App.prototype.showAuthDialog=function(a,c,f,d){var b=this.spinner.pause();this.s
App.prototype.convertFile=function(a,c,f,d,b,e){var g=c;/\.svg$/i.test(g)||(g=g.substring(0,c.lastIndexOf("."))+d);var k=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(k=!0);if(/\.vsdx$/i.test(c)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var l=new XMLHttpRequest;l.open("GET",a,!0);k||(l.responseType="blob");l.onload=mxUtils.bind(this,function(){var a=null;k?(a=JSON.parse(l.responseText),a=this.base64ToBlob(a.content,
"application/octet-stream")):a=new Blob([l.response],{type:"application/octet-stream"});this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(new LocalFile(this,a.responseText,g,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}),c)});l.send()}else{var m=mxUtils.bind(this,function(d){try{/\.png$/i.test(c)?(temp=this.extractGraphModelFromPng(d),null!=temp?b(new LocalFile(this,temp,g,!0)):b(new LocalFile(this,d,c,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&
this.isRemoteFileFormat(d,a)?this.parseFile(new Blob([d],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(new LocalFile(this,a.responseText,g,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}),c):b(new LocalFile(this,d,g,!0))}catch(p){null!=e&&e(p)}});f=/\.png$/i.test(c)||/\.jpe?g$/i.test(c)||null!=f&&"image/"==f.substring(0,6);k?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=
-b){a=JSON.parse(a.getText());var d=a.content;"base64"===a.encoding&&(d=/\.png$/i.test(c)?"data:image/png;base64,"+d:/\.jpe?g$/i.test(c)?"data:image/jpeg;base64,"+d:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(d):atob(d));m(d)}}else null!=e&&e({code:App.ERROR_UNKNOWN})}),function(){null!=e&&e({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=e&&e({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,m,e,f)}};
-App.prototype.loadUrl=function(a,c,f,d,b){try{var e=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a);b=null!=b?b:!0;var g=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var b=a.getText();if(e){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var b=Array(a.length),d=0;d<a.length;d++)b[d]=String.fromCharCode(a[d]);
-b=b.join("")}b="data:image/png;base64,"+this.base64Encode(b)}c(b)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!=f&&f({code:App.ERROR_UNKNOWN})},e,this.timeout,function(){b&&null!=f&&f({code:App.ERROR_TIMEOUT,retry:g})})});g()}catch(k){null!=f&&f(k)}};
+b){a=JSON.parse(a.getText());var d=a.content;"base64"===a.encoding&&(d=/\.png$/i.test(c)?"data:image/png;base64,"+d:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(d):atob(d));m(d)}}else null!=e&&e({code:App.ERROR_UNKNOWN})}),function(){null!=e&&e({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=e&&e({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,m,e,f)}};
+App.prototype.loadUrl=function(a,c,f,d,b){try{var e=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);b=null!=b?b:!0;var g=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var b=a.getText();if(e){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var b=Array(a.length),d=0;d<
+a.length;d++)b[d]=String.fromCharCode(a[d]);b=b.join("")}b="data:image/png;base64,"+this.base64Encode(b)}c(b)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!=f&&f({code:App.ERROR_UNKNOWN})},e,this.timeout,function(){b&&null!=f&&f({code:App.ERROR_TIMEOUT,retry:g})})});g()}catch(k){null!=f&&f(k)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="40px";this.appIcon.style.backgroundColor="#f18808";this.appIcon.style.height=this.menubarHeight+"px";mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX?
this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":a==App.MODE_ONEDRIVE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)":a==App.MODE_GITHUB&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=a}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);this.fnameWrapper=document.createElement("div");
@@ -7756,53 +7757,54 @@ mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spi
function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});l.setToggleAction(!0);l.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){d.isEditing()&&d.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");
e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""))},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),
b):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(b.addItem(mxResources.get("formatPng")+"...",null,mxUtils.bind(this,function(){a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportImage(a/100,b,c,d,e,g,!k,l)}),!0)}),c),a.jpgSupported&&b.addItem(mxResources.get("formatJpg")+"...",null,mxUtils.bind(this,
-function(){a.showExportJpgDialog("https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportImage(a/100,!1,b,c,!1,d,!e,!1,"jpeg")}),!0)}),c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.addItem(mxResources.get("image")+"...",null,mxUtils.bind(this,function(){a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,b){this.editorUi.downloadFile(b?"xmlpng":"png",null,null,a)}))}),
-c);b.addItem(mxResources.get("formatSvg")+"...",null,mxUtils.bind(this,function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportSvg(a/100,b,c,d,e,f,g,!k,l)}),!0)}),c);b.addSeparator(c);mxClient.IS_CHROMEAPP?b.addItem(mxResources.get("formatPdf")+"...",null,this.editorUi.actions.get("exportPdf").funct,c):a.isOffline()||mxClient.IS_IOS&&
-navigator.standalone||b.addItem(mxResources.get("formatPdf")+"...",null,mxUtils.bind(this,function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible);f.style.marginBottom=
-"16px";b=new CustomDialog(a,b,mxUtils.bind(this,function(){this.editorUi.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));this.editorUi.showDialog(b.container,300,146,!0,!0)}),c);b.addItem(mxResources.get("formatHtmlEmbedded")+"...",null,mxUtils.bind(this,function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,
-k,l,m,n){a.createHtml(b,c,d,e,f,g,k,l,m,n,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}),c);b.addSeparator(c);b.addItem(mxResources.get("formatXml")+"...",null,mxUtils.bind(this,function(){var b=document.createElement("div");
-b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get(c?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):
-g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));this.editorUi.showDialog(b.container,300,146,!0,!0)}),c);/.*\.draw\.io$/.test(window.location.hostname)&&b.addItem(mxResources.get("url")+"...",null,mxUtils.bind(this,function(){a.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,
-!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}),c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,c){function f(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,
-"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=
-e;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function l(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=n(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");m(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var m=mxUtils.bind(this,
-function(b,c,e){var f=d.view,g=d.getGraphBounds(),k=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),l=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"image/"==c.substring(0,6)?a.loadImage(b,mxUtils.bind(this,function(f){a.resizeImage(f,b,mxUtils.bind(this,function(f,g,m){f=Math.min(1,Math.min(a.maxImageSize/g,a.maxImageSize/m));a.importFile(b,c,k,l,Math.round(g*f),Math.round(m*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),
-!0)}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,k,l,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),n=mxUtils.bind(this,function(a){var b="text/xml";/(\.png)$/i.test(a)?b="image/png":/(\.jpe?g)$/i.test(a)&&(b="image/jpg");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){l(a.drive)},
-c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){l(a.gitHub)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){l(a.dropbox)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){l(a.oneDrive)},c):
-k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){f(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){f(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&
-a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){m(a,c,b)},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c));b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c)})).isEnabled=b;this.put("theme",new Menu(mxUtils.bind(this,
-function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,
-function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),
-b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=b;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=
-c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,
-function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(a.getEditBlankXml(),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=
-App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){window.open("http://www.draw.io/app")}));a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+
-"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||
-this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),
-b)})));var q="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),u=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)};a.actions.addAction("insertText",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=
-d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html=1;resizable=0;autosize=1;align=left;verticalAlign=top;spacingTop=-4;points=[];");a.vertex=!0;d.startEditingAtCell(d.addCell(a))}},null,null,"Ctrl+Shift+X").isEnabled=b;a.actions.addAction("insertRectangle",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,
-a.y,120,60),"whiteSpace=wrap;html=1;");a.vertex=!0;d.setSelectionCell(d.addCell(a));d.scrollCellToVisible(d.getSelectionCell())}},null,null,"Ctrl+K").isEnabled=b;a.actions.addAction("insertEllipse",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace=wrap;html=1;");a.vertex=!0;d.setSelectionCell(d.addCell(a));d.scrollCellToVisible(d.getSelectionCell())}},
-null,null,"Ctrl+Shift+K").isEnabled=b;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<q.length;c++)"-"==q[c]?a.addSeparator(b):u(a,b,mxResources.get(q[c])+"...",q[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&
-(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+
-"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);
-isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?
-"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,
-null,null,null,App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,
-c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},
-c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||
-b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,
-c.getText(),b))}catch(z){a.handleError(z,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367-how-to-use-the-scratchpad-")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),
-c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addSubmenu("insert",b,c);b.addSeparator(c);this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,
-"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875-how-to-use-mathematical-typesetting-")}this.addMenuItems(b,["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed?b.addSeparator(c):(this.addMenuItems(b,["plugins","-"],c),d=this.addMenuItem(b,"tags",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,
-"https://desk.draw.io/support/solutions/articles/16000046966-how-to-use-tags"),this.addMenuItems(b,["-","offline"],c));a.isOffline()||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["chromeApp"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",
-b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],
-c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",
-b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();
-function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,f){this.ui=a;this.page=c;this.previous=f}
-RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,c,f){this.ui=a;this.oldIndex=c;this.newIndex=f}
-MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(a,c){this.ui=a;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c))}
+function(){a.showExportJpgDialog("https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportImage(a/100,!1,b,c,!1,d,!e,!1,"jpeg")}),!0)}),c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||(b.addItem(mxResources.get("formatPng")+"...",null,mxUtils.bind(this,function(){a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,b){this.editorUi.downloadFile(b?"xmlpng":"png",null,null,a)}))}),
+c),b.addItem(mxResources.get("formatJpg")+"...",null,mxUtils.bind(this,function(){a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,b){this.editorUi.downloadFile("jpeg",null,null,a)}),!0)}),c));b.addItem(mxResources.get("formatSvg")+"...",null,mxUtils.bind(this,function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){a=parseInt(a);!isNaN(a)&&
+0<a&&this.editorUi.exportSvg(a/100,b,c,d,e,f,g,!k,l)}),!0)}),c);b.addSeparator(c);mxClient.IS_CHROMEAPP?b.addItem(mxResources.get("formatPdf")+"...",null,this.editorUi.actions.get("exportPdf").funct,c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.addItem(mxResources.get("formatPdf")+"...",null,mxUtils.bind(this,function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport||mxEvent.addListener(e,"change",function(){e.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){this.editorUi.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));
+this.editorUi.showDialog(b.container,300,146,!0,!0)}),c);b.addItem(mxResources.get("formatHtmlEmbedded")+"...",null,mxUtils.bind(this,function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,k,l,m,n){a.createHtml(b,c,d,e,f,g,k,l,m,n,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+
+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}),c);b.addSeparator(c);b.addItem(mxResources.get("formatXml")+"...",null,mxUtils.bind(this,function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get(c?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));this.editorUi.showDialog(b.container,
+300,146,!0,!0)}),c);/.*\.draw\.io$/.test(window.location.hostname)&&b.addItem(mxResources.get("url")+"...",null,mxUtils.bind(this,function(){a.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}),c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",
+mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,c){function f(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});
+window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function l(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=n(b.getTitle());/\.svg$/i.test(b.getTitle())&&
+!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");m(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var m=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(),k=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),l=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,
+function(f){a.resizeImage(f,b,mxUtils.bind(this,function(f,g,m){f=Math.min(1,Math.min(a.maxImageSize/g,a.maxImageSize/m));a.importFile(b,c,k,l,Math.round(g*f),Math.round(m*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),!0)}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,k,l,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),
+n=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){l(a.drive)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){l(a.gitHub)},
+c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){l(a.dropbox)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){l(a.oneDrive)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
+"...",null,function(){f(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){f(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){m(a,c,b)},function(){a.spinner.stop();
+a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c));b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c)})).isEnabled=b;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);
+d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=
+a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));
+return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}})).isEnabled=b;a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?
+a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),
+mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(a.getEditBlankXml(),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));
+this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){window.open("http://www.draw.io/app")}));a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();
+null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);
+this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),b)})));var q="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),u=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==
+e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)};a.actions.addAction("insertText",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html=1;resizable=0;autosize=1;align=left;verticalAlign=top;spacingTop=-4;points=[];");
+a.vertex=!0;d.startEditingAtCell(d.addCell(a))}},null,null,"Ctrl+Shift+X").isEnabled=b;a.actions.addAction("insertRectangle",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace=wrap;html=1;");a.vertex=!0;d.setSelectionCell(d.addCell(a));d.scrollCellToVisible(d.getSelectionCell())}},null,null,"Ctrl+K").isEnabled=b;a.actions.addAction("insertEllipse",function(){if(d.isEnabled()&&
+!d.isCellLocked(d.getDefaultParent())){var a=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,80,80),"ellipse;whiteSpace=wrap;html=1;");a.vertex=!0;d.setSelectionCell(d.addCell(a));d.scrollCellToVisible(d.getSelectionCell())}},null,null,"Ctrl+Shift+K").isEnabled=b;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=
+0;c<q.length;c++)"-"==q[c]?a.addSeparator(b):u(a,b,mxResources.get(q[c])+"...",q[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,
+c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},
+c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",
+new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+
+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&
+a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(z){a.handleError(z,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},
+mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers",
+"-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367-how-to-use-the-scratchpad-")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,
+"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addSubmenu("insert",b,c);b.addSeparator(c);this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875-how-to-use-mathematical-typesetting-")}this.addMenuItems(b,
+["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed?b.addSeparator(c):(this.addMenuItems(b,["plugins","-"],c),d=this.addMenuItem(b,"tags",c),a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000046966-how-to-use-tags"),this.addMenuItems(b,["-","offline"],c));a.isOffline()||navigator.standalone||"1"==urlParams.embed||
+this.addMenuItems(b,["chromeApp"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],
+c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename",
+"makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",
+b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;
+DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,f){this.ui=a;this.page=c;this.previous=f}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
+function MovePage(a,c,f){this.ui=a;this.oldIndex=c;this.newIndex=f}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
+function SelectPage(a,c){this.ui=a;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c))}
SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,c=this.ui.editor,f=c.graph,d=c.graph.compress(f.zapGremlins(mxUtils.getXml(c.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=f.getViewState();a.root=f.model.root;f.view.clear(a.root,!0);f.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;f.model.rootChanged(a.root);f.setViewState(a.viewState);
c.fireEvent(new mxEventObject("setViewState","change",this));f.gridEnabled=f.gridEnabled&&(!this.ui.editor.chromeless||"1"==urlParams.grid);c.updateGraphComponents();f.view.validate();f.sizeDidChange();this.neverShown&&(this.neverShown=!1,f.selectUnlockedLayer());c.graph.fireEvent(new mxEventObject(mxEvent.ROOT));c.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,c,f,d){SelectPage.call(this,a,f);this.relatedPage=c;this.index=d;this.previousIndex=null}
mxUtils.extend(ChangePage,SelectPage);ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;SelectPage.prototype.execute.apply(this,arguments)};
diff --git a/war/js/diagramly/App.js b/war/js/diagramly/App.js
index 19df48b5..8408e306 100644
--- a/war/js/diagramly/App.js
+++ b/war/js/diagramly/App.js
@@ -4237,10 +4237,6 @@ App.prototype.convertFile = function(url, filename, mimeType, extension, success
{
data = 'data:image/png;base64,' + data;
}
- else if (/\.jpe?g$/i.test(filename))
- {
- data = 'data:image/jpeg;base64,' + data;
- }
else
{
// Workaround for character encoding issues in IE10/11
@@ -4283,7 +4279,8 @@ App.prototype.loadUrl = function(url, success, error, forceBinary, retry)
{
try
{
- var binary = (forceBinary || /(\.png)($|\?)/i.test(url) || /(\.jpe?g)($|\?)/i.test(url));
+ var binary = forceBinary || /(\.png)($|\?)/i.test(url) ||
+ /(\.jpe?g)($|\?)/i.test(url) || /(\.gif)($|\?)/i.test(url);
retry = (retry != null) ? retry : true;
var fn = mxUtils.bind(this, function()
@@ -4314,7 +4311,8 @@ App.prototype.loadUrl = function(url, success, error, forceBinary, retry)
data = tmp.join('');
}
- // LATER: Could be JPG but modern browser ignore the mime type
+ // LATER: Could be JPG but modern browsers
+ // ignore the mime type in the data URI
data = 'data:image/png;base64,' + this.base64Encode(data);
}
diff --git a/war/js/diagramly/Dialogs.js b/war/js/diagramly/Dialogs.js
index 629c77dd..988b3cb4 100644
--- a/war/js/diagramly/Dialogs.js
+++ b/war/js/diagramly/Dialogs.js
@@ -4304,7 +4304,7 @@ var LinkDialog = function(editorUi, initialValue, btnLabel, fn)
};
var btns = document.createElement('div');
- btns.style.marginTop = '14px';
+ btns.style.marginTop = '20px';
btns.style.textAlign = 'right';
var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
@@ -4352,10 +4352,25 @@ var LinkDialog = function(editorUi, initialValue, btnLabel, fn)
linkInput.focus();
};
+
+ function addButton(src, tooltip, fn)
+ {
+ var gpBtn = mxUtils.button('', fn);
+ gpBtn.className = 'geBtn';
+ gpBtn.setAttribute('title', tooltip);
+ var img = document.createElement('img');
+ img.style.height = '26px';
+ img.style.width = '26px';
+ img.setAttribute('src', src);
+ img.setAttribute('valign', 'bottom');
+ gpBtn.style.minWidth = '42px';
+ gpBtn.appendChild(img);
+ btns.appendChild(gpBtn);
+ };
if (typeof(google) != 'undefined' && typeof(google.picker) != 'undefined' && editorUi.drive != null)
{
- var gpBtn = mxUtils.button(mxResources.get('googlePlus'), function()
+ addButton(IMAGE_PATH + '/google-drive-logo.svg', mxResources.get('googlePlus'), function()
{
if (editorUi.spinner.spin(document.body, mxResources.get('authorizing')))
{
@@ -4403,13 +4418,11 @@ var LinkDialog = function(editorUi, initialValue, btnLabel, fn)
}));
}
});
- gpBtn.className = 'geBtn';
- btns.appendChild(gpBtn);
}
if (typeof(Dropbox) != 'undefined' && typeof(Dropbox.choose) != 'undefined')
{
- var dbBtn = mxUtils.button(mxResources.get('dropbox'), function()
+ addButton(IMAGE_PATH + '/dropbox-logo.svg', mxResources.get('dropbox'), function()
{
// Authentication will be carried out on open to make sure the
// autosave does not show an auth dialog. Showing it here will
@@ -4427,42 +4440,48 @@ var LinkDialog = function(editorUi, initialValue, btnLabel, fn)
}
});
});
- dbBtn.className = 'geBtn';
- btns.appendChild(dbBtn);
}
if (typeof(WL) != 'undefined' && typeof(WL.fileDialog) != 'undefined' && editorUi.oneDrive != null)
{
- var dbBtn = mxUtils.button(mxResources.get('oneDrive'), function()
+ addButton(IMAGE_PATH + '/onedrive-logo.svg', mxResources.get('oneDrive'), function()
+ {
+ WL.fileDialog(
+ {
+ mode: 'open',
+ select: 'single'
+ }).then(
+ function (resp)
+ {
+ if (resp != null && resp.data != null && resp.data.files != null && resp.data.files.length > 0)
+ {
+ linkInput.value = resp.data.files[0].link;
+ }
+ },
+ function (responseFailed) {}
+ );
+ });
+ }
+
+ if (editorUi.gitHub != null)
+ {
+ addButton(IMAGE_PATH + '/github-logo.svg', mxResources.get('github'), function()
{
- if (editorUi.spinner.spin(document.body, mxResources.get('authorizing')))
+ editorUi.gitHub.pickFile(function(path)
{
- editorUi.oneDrive.execute(mxUtils.bind(this, function(token)
+ if (path != null)
{
- if (token != null)
- {
- editorUi.spinner.stop();
-
- WL.fileDialog(
- {
- mode: 'open',
- select: 'single'
- }).then(
- function (resp)
- {
- if (resp != null && resp.data != null && resp.data.files != null && resp.data.files.length > 0)
- {
- linkInput.value = resp.data.files[0].link;
- }
- },
- function (responseFailed) {}
- );
- }
- }));
- }
+ var tokens = path.split('/');
+ var org = tokens[0];
+ var repo = tokens[1];
+ var ref = tokens[2];
+ var path = tokens.slice(3, tokens.length).join('/');
+
+ linkInput.value = 'https://github.com/' + org + '/' +
+ repo + '/blob/' + ref + '/' + path;
+ }
+ });
});
- dbBtn.className = 'geBtn';
- btns.appendChild(dbBtn);
}
mxEvent.addListener(linkInput, 'keypress', function(e)
diff --git a/war/js/diagramly/EditorUi.js b/war/js/diagramly/EditorUi.js
index 046f1a62..a1e2c498 100644
--- a/war/js/diagramly/EditorUi.js
+++ b/war/js/diagramly/EditorUi.js
@@ -80,6 +80,11 @@
EditorUi.prototype.enableLogging = true;
/**
+ * Specifies if PDF export with pages is enabled.
+ */
+ EditorUi.prototype.pdfPageExport = true;
+
+ /**
* Capability check for canvas export
*/
(function()
@@ -1087,6 +1092,10 @@
{
filename = basename + '.png';
}
+ else if (format == 'jpeg')
+ {
+ filename = basename + '.jpg';
+ }
this.saveRequest(filename, format, mxUtils.bind(this, function(newTitle, base64)
{
@@ -1284,7 +1293,7 @@
this.editor.fireEvent(new mxEventObject('fileLoaded'));
result = true;
- if (this.enableLogging && !this.isOffline())
+ if (this.enableLogging && !this.isOffline() && file.getMode() != null)
{
try
{
@@ -3459,7 +3468,7 @@
/**
*
*/
- EditorUi.prototype.showRemoteExportDialog = function(btnLabel, helpLink, callback)
+ EditorUi.prototype.showRemoteExportDialog = function(btnLabel, helpLink, callback, hideInclude)
{
var div = document.createElement('div');
div.style.whiteSpace = 'nowrap';
@@ -3471,14 +3480,18 @@
var selection = this.addCheckbox(div, mxResources.get('selectionOnly'), false,
this.editor.graph.isSelectionEmpty());
- var include = this.addCheckbox(div, mxResources.get('includeCopyOfMyDiagram'), true);
- include.style.marginBottom = '16px';
-
+ var include = (hideInclude) ? null : this.addCheckbox(div, mxResources.get('includeCopyOfMyDiagram'), true);
+
+ if (include != null)
+ {
+ include.style.marginBottom = '16px';
+ }
+
var dlg = new CustomDialog(this, div, mxUtils.bind(this, function()
{
- callback(!selection.checked, include.checked);
+ callback(!selection.checked, (include != null) ? include.checked : false);
}), null, btnLabel, helpLink);
- this.showDialog(dlg.container, 300, 146, true, true);
+ this.showDialog(dlg.container, 300, (hideInclude) ? 100 : 146, true, true);
};
/**
diff --git a/war/js/diagramly/GitHubClient.js b/war/js/diagramly/GitHubClient.js
index b1a40b46..f63e9464 100644
--- a/war/js/diagramly/GitHubClient.js
+++ b/war/js/diagramly/GitHubClient.js
@@ -397,7 +397,18 @@ GitHubClient.prototype.createGitHubFile = function(org, repo, ref, data, asLibra
if (data.encoding === 'base64')
{
- content = Base64.decode(content);
+ if (/\.jpe?g$/i.test(data.name))
+ {
+ content = 'data:image/jpeg;base64,' + content;
+ }
+ else if (/\.gif$/i.test(data.name))
+ {
+ content = 'data:image/gif;base64,' + content;
+ }
+ else
+ {
+ content = Base64.decode(content);
+ }
}
return (asLibrary) ? new GitHubLibrary(this.ui, content, meta) : new GitHubFile(this.ui, content, meta);
@@ -615,6 +626,9 @@ GitHubClient.prototype.saveFile = function(file, success, error)
this.getFile(org + '/' + repo + '/' + ref + '/' + path, mxUtils.bind(this, function(tempFile)
{
fn(tempFile.meta.sha);
+ }), mxUtils.bind(this, function()
+ {
+ fn(null);
}));
}));
this.ui.showDialog(dlg.container, 340, 150, true, false);
diff --git a/war/js/diagramly/Menus.js b/war/js/diagramly/Menus.js
index 739923f9..6e10c749 100644
--- a/war/js/diagramly/Menus.js
+++ b/war/js/diagramly/Menus.js
@@ -1201,13 +1201,21 @@
// Disabled for standalone mode in iOS because new tab cannot be closed
else if (!editorUi.isOffline() && (!mxClient.IS_IOS || !navigator.standalone))
{
- menu.addItem(mxResources.get('image') + '...', null, mxUtils.bind(this, function()
+ menu.addItem(mxResources.get('formatPng') + '...', null, mxUtils.bind(this, function()
{
editorUi.showRemoteExportDialog(mxResources.get('export'), null, mxUtils.bind(this, function(ignoreSelection, editable)
{
this.editorUi.downloadFile((editable) ? 'xmlpng' : 'png', null, null, ignoreSelection);
}));
}), parent);
+
+ menu.addItem(mxResources.get('formatJpg') + '...', null, mxUtils.bind(this, function()
+ {
+ editorUi.showRemoteExportDialog(mxResources.get('export'), null, mxUtils.bind(this, function(ignoreSelection, editable)
+ {
+ this.editorUi.downloadFile('jpeg', null, null, ignoreSelection);
+ }), true);
+ }), parent);
}
menu.addItem(mxResources.get('formatSvg') + '...', null, mxUtils.bind(this, function()
@@ -1250,9 +1258,26 @@
var selection = editorUi.addCheckbox(div, mxResources.get('selectionOnly'),
false, graph.isSelectionEmpty());
var crop = editorUi.addCheckbox(div, mxResources.get('crop'),
- !graph.pageVisible);
+ !graph.pageVisible || !editorUi.pdfPageExport,
+ !editorUi.pdfPageExport);
crop.style.marginBottom = '16px';
+ // Crop is only enabled if selection only is selected
+ if (!editorUi.pdfPageExport)
+ {
+ mxEvent.addListener(selection, 'change', function()
+ {
+ if (selection.checked)
+ {
+ crop.removeAttribute('disabled');
+ }
+ else
+ {
+ crop.setAttribute('disabled', 'disabled');
+ }
+ });
+ }
+
var dlg = new CustomDialog(editorUi, div, mxUtils.bind(this, function()
{
this.editorUi.downloadFile('pdf', null, null, !selection.checked, null, !crop.checked);
@@ -1421,7 +1446,7 @@
var x = graph.snap(Math.ceil(Math.max(0, bds.x / view.scale - view.translate.x) + 4 * graph.gridSize));
var y = graph.snap(Math.ceil(Math.max(0, (bds.y + bds.height) / view.scale - view.translate.y) + 4 * graph.gridSize));
- if (mime.substring(0, 6) == 'image/')
+ if (data.substring(0, 11) == 'data:image/')
{
editorUi.loadImage(data, mxUtils.bind(this, function(img)
{
@@ -1456,14 +1481,18 @@
{
var mime = 'text/xml';
- if (/(\.png)$/i.test(filename))
+ if (/\.png$/i.test(filename))
{
mime = 'image/png';
}
- else if (/(\.jpe?g)$/i.test(filename))
+ else if (/\.jpe?g$/i.test(filename))
{
mime = 'image/jpg';
}
+ else if (/\.gif$/i.test(filename))
+ {
+ mime = 'image/gif';
+ }
return mime;
});
diff --git a/war/js/embed-static.min.js b/war/js/embed-static.min.js
index 832d2b0a..0802d58e 100644
--- a/war/js/embed-static.min.js
+++ b/war/js/embed-static.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+x.join(",")+"}";f=t;return l}}"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||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"6.2.4",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.2.5",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/")||
diff --git a/war/js/reader.min.js b/war/js/reader.min.js
index 5027a6f8..f67fc69e 100644
--- a/war/js/reader.min.js
+++ b/war/js/reader.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+x.join(",")+"}";f=t;return l}}"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||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"6.2.4",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.2.5",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/")||
diff --git a/war/js/viewer.min.js b/war/js/viewer.min.js
index f98d2594..2dc579ef 100644
--- a/war/js/viewer.min.js
+++ b/war/js/viewer.min.js
@@ -2621,14 +2621,14 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
[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 r=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 r.apply(this,arguments)}})();
(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
-EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.enableLogging=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!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(p){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c=a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=
-null!==c.match("image/jpeg")}catch(n){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=
-function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),b=0;b<a.length;b++)"picker modal-dialog picker-dialog"==a[b].className&&(a[b].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return mxClient.IS_FF&&this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
-function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),e=d.spin;d.spin=function(c,f){var k=!1;this.active||(e.call(this,c),this.active=!0,null!=f&&(k=document.createElement("div"),k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize="9pt",k.style.padding="6px",
-k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,a)+"px",k.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),k.innerHTML=f+"...",c.appendChild(k),d.status=k,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(k.style.left=Math.round(Math.max(0,a-k.offsetWidth/
-2))+"px",k.style.top=Math.round(Math.max(0,b+70-k.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,f)}));this.stop();return a}),k=!0);return k};var f=d.stop;d.stop=function(){f.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=f;f+=b;return a.substring(c,f)}function e(a){a=d(a,4);return a.charCodeAt(3)+
-(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var f=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=e(a);var k=d(a,4);if(null!=b&&b(f-8,k,c))break;value=d(a,c);d(a,4);if("IEND"==k)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(n){}return!1};
+EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.enableLogging=!0;EditorUi.prototype.pdfPageExport=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!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(p){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c=
+a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(n){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};
+EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),b=0;b<a.length;b++)"picker modal-dialog picker-dialog"==a[b].className&&(a[b].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return mxClient.IS_FF&&this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};
+EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),e=d.spin;d.spin=function(c,f){var k=!1;this.active||(e.call(this,c),this.active=!0,null!=f&&(k=document.createElement("div"),k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily="Helvetica, Arial",k.style.fontSize=
+"9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,a)+"px",k.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),k.innerHTML=f+"...",c.appendChild(k),d.status=k,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(k.style.left=Math.round(Math.max(0,
+a-k.offsetWidth/2))+"px",k.style.top=Math.round(Math.max(0,b+70-k.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,f)}));this.stop();return a}),k=!0);return k};var f=d.stop;d.stop=function(){f.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=f;f+=b;return a.substring(c,f)}function e(a){a=d(a,
+4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var f=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=e(a);var k=d(a,4);if(null!=b&&b(f-8,k,c))break;value=d(a,c);d(a,4);if("IEND"==k)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(n){}return!1};
var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("&lt;mxfile ");if(0<=d){var e=b.lastIndexOf("&lt;/mxfile&gt;");e>d&&(c=b.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),k=this.editor.extractGraphModel(f.documentElement,null!=this.pages),c=null!=k?mxUtils.getXml(k):""}catch(r){}return c};EditorUi.prototype.validateFileData=
function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+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")),
@@ -2647,87 +2647,87 @@ e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![end
!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&&null!=
b&&(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.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||
/(\.svg)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var k=this.getBaseFilename(),g=k+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(g,a,l,"text/xml")}else if("html"==a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,k),this.saveData(g,a,l,"text/html");
-else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a&&(g=k+".png"),this.saveRequest(g,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var k=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return k}catch(y){this.handleError(y)}}));else{var m=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var p=this.editor.graph.background;p==mxConstants.NONE&&(p=null);var q=this.editor.graph.getSvg(p,null,null,null,null,d);c&&this.editor.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=
-k+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),d)}}catch(x){this.handleError(x)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=0;k<this.pages.length;k++)if(this.pages[k]==
-this.currentPage){f="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+d+"&embedXml="+e+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();
-var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);null!=c&&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{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);
-a.addListener("contentChanged",this.descriptorChangedListener);this.descriptorChanged();a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus(mxResources.get("readOnly")));this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus());
-this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;if(this.enableLogging&&!this.isOffline())try{var e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e.src=f+"/log?msg=storageMode:"+encodeURIComponent(a.getMode())+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(r){}if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(r){}}catch(r){null!=
-window.console&&console.log("error in fileLoaded:",a,r);if(this.enableLogging&&!this.isOffline())try{e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"",e.src=f+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=r&&null!=r.message?":err:"+encodeURIComponent(r.message):"")+(null!=r&&null!=r.stack?"&stack="+encodeURIComponent(r.stack):"")}catch(t){}this.handleError(r,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!=c?this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,f,g){};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.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],k=f.data;if(null!=k){var k=this.convertDataUri(k),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
-"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+k,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(k=this.stringToCells(this.editor.graph.decompress(f.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;
-c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");g.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("align",
-"top");m.setAttribute("border","0");m.className="geButton";m.style.marginRight="1px";m.style.marginTop="-1px";l.appendChild(m);var v=null;mxEvent.addListener(m,"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(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==k?k.setAttribute("title",mxResources.get("libraryTooltip")):
-k.removeAttribute("title")}));if(a.isEditable()){var z=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),x=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=m.cloneNode(!1),E.setAttribute("src",Editor.spinImage),E.setAttribute("title",mxResources.get("saving")),E.style.cursor="default",E.style.marginRight="2px",E.style.marginTop="-2px",l.insertBefore(E,
-l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),g.style.paddingRight=18*l.childNodes.length+"px")})):null==v&&(v=m.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",mxResources.get("save")),l.insertBefore(v,l.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==
-LocalLibrary,!0);v.parentNode.removeChild(v);v=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,f){a=z.cloneCells(z.model.getTopmostCells(a));for(var g=0;g<a.length;g++){var l=z.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.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)}),G=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)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,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)":k.style.border="3px dotted rgb(254, 137, 12)",k.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&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=!0,G(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&
-null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.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(k,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";
-a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.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,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
-this.convertDataUri(c),q=[new mxCell("",new mxGeometry(0,0,m,n),q)];q[0].vertex=!0;C(q,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var r=JSON.parse(mxUtils.getTextContent(c.documentElement));f(r,k);b=b.concat(r);x(a);this.spinner.stop();p=!0}catch(D){}else if("mxfile"==c.documentElement.nodeName)try{r=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),
-q=this.stringToCells(this.editor.graph.decompress(r)),C(q,new mxRectangle(0,0,m,n),a),p=!0}catch(D){}p||(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(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));
-m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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)})),l.insertBefore(c,l.firstChild));var E=null;mxEvent.addListener(m,"click",G)}g.appendChild(l);g.style.paddingRight=18*l.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"),k=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(f=mxResources.get("cancel"),k=function(){d();e.retry()}),"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 g=window.location.hash;null!=g&&"#G"==g.substring(0,2)&&(g=g.substring(2),a+=' <a href="https://drive.google.com/open?id='+g+'" target="_blank">'+mxResources.get("tryOpeningViaThisPage")+"</a>")}else e.code==App.ERROR_TIMEOUT?a=mxResources.get("timeout"):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,k)}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.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));
-return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename,e=d.lastIndexOf(".");0<e&&(d=d.substring(0,e));e="jpeg"==c?"jpg":c;d+="."+e;a=this.createImageDataUri(a,b,c);this.saveData(d,e,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&
-8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(c),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=
-new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var f=document.createElement("a");if("undefined"!==typeof f.download||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));"undefined"!==typeof f.download?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);
-try{f.click(),window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.parentNode.removeChild(f)}catch(r){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=
-b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),g=0;g<e;++g){for(var k=1024*g,l=Math.min(k+1024,d),A=Array(l-k),v=0;k<l;++v,++k)A[v]=c[k].charCodeAt(0);f[g]=new Uint8Array(A)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e){e=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG)f=window.open("about:blank"),
-null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());else if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('<html><img src="data:'+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),f.document.close())}else f=window.open("data:"+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else e==App.MODE_DEVICE?
-this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(u){this.handleError(u)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e,null,null,4);this.showDialog(b.container,380,5>this.getServiceCount(!1)-1?270:390,!0,!0);b.init()};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,
-function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}))};EditorUi.prototype.saveRequest=function(a,b,c){var d=!mxClient.IS_IOS||!navigator.standalone;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var e=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||"_blank"==d?"0":"1");null!=e&&(d==App.MODE_DEVICE||"_blank"==d?e.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){this.spinner.spin(document.body,mxResources.get("saving"))&&
-e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),a,f,!0,d,c)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,d,null,null,4);this.showDialog(a.container,380,
-5>this.getServiceCount(!1)-1?270:390,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,g,t,u){if(this.spinner.spin(document.body,mxResources.get("export"))){var k=this.editor.graph.isSelectionEmpty();c=null!=c?c:k;k=b?null:this.editor.graph.background;k==mxConstants.NONE&&(k=null);null==k&&0==b&&(k="#ffffff");var l=this.editor.graph.getSvg(k,a,g,t,null,c);d&&this.editor.addSvgShadow(l);
-a=this.getCurrentFile();var m=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=m.lastIndexOf(".");0<a&&(m=m.substring(0,a));var m=m+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,u));var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,l,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,n,this.thumbImageCache)):n(l)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e){var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled",
-"disabled");a.appendChild(f);mxUtils.write(a,b);e||mxUtils.br(a);return f};EditorUi.prototype.addLinkSection=function(a,b){function c(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");
-d.style.width="100px";d.style.marginLeft="4px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&
-(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();g.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width=
-"22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,t){var k=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),
-e&&l.push("edit=_blank"),f&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&l.push("page="+a);break}a=!0;null!=g?c="#U"+encodeURIComponent(g):(k=this.getCurrentFile(),t||null==k||k.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
-(c="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,t,u,A,v){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=e);"auto"!==d&&(l.target=d);u||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||
-100==c||(l.zoom=c/100);c=[];g&&(c.push("pages"),l.resize=!0,null!=this.pages&&null!=this.currentPage&&(l.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),l.resize=!0);t&&c.push("layers");0<c.length&&(u&&c.push("lightbox"),l.toolbar=c.join(" "));A&&(l.edit=null!=a?a:"_blank");null!=a?l.url=a:l.xml=this.getFileData(!0,null,null,null,null,!g);b='<div class="mxgraph" style="'+(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(l))+
-'"></div>';k=0<k.length?"s="+k.join(";"):"";a=null!=a?"fetch="+encodeURIComponent(a):"";v(b,'<script type="text/javascript" src="'+(0<k.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1&"+k:"https://www.draw.io/embed2.js?"+k)+"&"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");
-mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value",
-"copy");g.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(l=document.createElement("a"),l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),
-g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),z=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var B=document.createElement("input");B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight=
-"12px";B.value="100%";e.appendChild(B);var x=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(e,mxResources.get("allPages"),g,!g),G=this.addCheckbox(e,mxResources.get("layers"),!0),E=this.addCheckbox(e,mxResources.get("lightbox"),!0),y=this.addCheckbox(e,mxResources.get("showEditButton"),!0);y.style.marginLeft="24px";y.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?y.removeAttribute("disabled"):y.setAttribute("disabled",
-"disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,z.checked,B.value,n.getTarget(),n.getColor(),x.checked,C.checked,G.checked,E.checked,y.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
-g.appendChild(k);var l=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941-how-to-publicly-publish-a-copy-of-your-draw-io-diagram";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384-how-to-publicly-publish-a-copy-of-your-draw-io-diagram-stored-in-google-drive",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);g.appendChild(m);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));
-m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var p=null,q=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),p=document.createElement("input"),
-p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",g.appendChild(p),mxUtils.write(g,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=d+"px",g.appendChild(q),mxUtils.br(g);var x=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var C=null;
-if(null==l||l.constructor!=window.DriveFile||b)C=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var G=this.addCheckbox(g,mxResources.get("lightbox"),!0),E=this.addCheckbox(g,mxResources.get("showEditButton"),!0);E.style.marginLeft="24px";var y=this.addCheckbox(g,mxResources.get("layers"),!0);y.style.marginLeft=E.style.marginLeft;y.style.marginBottom="16px";mxEvent.addListener(G,"change",function(){G.checked?(y.removeAttribute("disabled"),E.removeAttribute("disabled")):(y.setAttribute("disabled",
-"disabled"),E.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(x.getTarget(),x.getColor(),null==C?!0:C.checked,G.checked,E.checked,y.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):x.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,
-b,c){var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0);g.style.marginBottom="16px";a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!f.checked,
-g.checked)}),null,a,b);this.showDialog(a.container,300,146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=this.editor.graph,l=280,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(m);mxUtils.write(g,mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";
-n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";g.appendChild(n);mxUtils.write(g,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value="0";g.appendChild(p);mxUtils.br(g);var q=this.addCheckbox(g,mxResources.get("transparentBackground"),k.background==mxConstants.NONE||null==k.background),x=this.addCheckbox(g,mxResources.get("selectionOnly"),
-!1,k.isSelectionEmpty()),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");f&&(g.appendChild(C),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),l+=26);k.isSelectionEmpty()?C.setAttribute("disabled","disabled"):(C.setAttribute("checked","checked"),C.defaultChecked=!0);var G=this.addCheckbox(g,mxResources.get("shadow"),k.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type",
-"checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(g.appendChild(E),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),l+=26);var y=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0);a=null!=this.pages&&1<this.pages.length;var H=H=this.addCheckbox(g,mxResources.get("allPages"),a,!a);H.style.marginLeft="24px";H.style.marginBottom="16px";mxEvent.addListener(y,"change",function(){y.checked?H.removeAttribute("disabled"):H.setAttribute("disabled",
-"disabled")});c=new CustomDialog(this,g,mxUtils.bind(this,function(){e(n.value,q.checked,!x.checked,G.checked,y.checked,E.checked,p.value,C.checked,!H.checked)}),null,c,d);this.showDialog(c.container,320,l,!0,!0);n.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showExportJpgDialog=function(a,b){var c=document.createElement("div");c.style.whiteSpace="nowrap";var d=this.editor.graph,e=document.createElement("h3");
-mxUtils.write(e,mxResources.get("formatJpg"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(e);mxUtils.write(c,mxResources.get("zoom")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginRight="16px";f.style.width="60px";f.style.marginLeft="4px";f.style.marginBottom="4px";f.value="100%";c.appendChild(f);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type",
-"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=document.createElement("input");l.style.marginTop="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");c.appendChild(l);mxUtils.write(c,mxResources.get("crop"));mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=
-!0);var A=this.addCheckbox(c,mxResources.get("shadow"),d.shadowVisible),d=document.createElement("input");d.style.marginTop="16px";d.style.marginRight="8px";d.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||d.setAttribute("disabled","disabled");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,!k.checked,A.checked,g.value,l.checked)}),null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||
-mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(k)}var l=this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,
-!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addCheckbox(f,mxResources.get("showEditButton"),!0);B.style.marginLeft="24px";var x=1<g.model.getChildCount(g.model.getRoot()),C=this.addCheckbox(f,mxResources.get("layers"),x,!x);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?(x&&C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled",
-"disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,B.checked,C.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=k+".png":"jpeg"==a&&(g=k+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var k=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return k}catch(y){this.handleError(y)}}));else{var m=null,n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):
+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var p=this.editor.graph.background;p==mxConstants.NONE&&(p=null);var q=this.editor.graph.getSvg(p,null,null,null,null,d);c&&this.editor.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();n('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a))})))}else g=k+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),d)}}catch(x){this.handleError(x)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&null!=this.currentPage))for(var k=
+0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){f="&from="+k;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+d+"&embedXml="+e+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();
+this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);null!=c&&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{this.setCurrentFile(a);a.addListener("descriptorChanged",
+this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);this.descriptorChanged();a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus(mxResources.get("readOnly")));this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==
+window.top&&window.focus());this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;if(this.enableLogging&&!this.isOffline()&&null!=a.getMode())try{var e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e.src=f+"/log?msg=storageMode:"+encodeURIComponent(a.getMode())+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(r){}if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),
+mode:a.getMode()})}catch(r){}}catch(r){null!=window.console&&console.log("error in fileLoaded:",a,r);if(this.enableLogging&&!this.isOffline())try{e=new Image,f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"",e.src=f+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=r&&null!=r.message?":err:"+encodeURIComponent(r.message):"")+(null!=r&&null!=r.stack?"&stack="+encodeURIComponent(r.stack):"")}catch(t){}this.handleError(r,
+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!=c?this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,f,g){};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.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],k=f.data;if(null!=k){var k=this.convertDataUri(k),
+g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+k,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(k=this.stringToCells(this.editor.graph.decompress(f.xml)),0<k.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(k,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,
+a)}));this.repositionLibrary(d);var g=k.parentNode.previousSibling;c=g.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");g.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",
+mxResources.get("close"));m.setAttribute("align","top");m.setAttribute("border","0");m.className="geButton";m.style.marginRight="1px";m.style.marginTop="-1px";l.appendChild(m);var v=null;mxEvent.addListener(m,"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(k,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==
+k?k.setAttribute("title",mxResources.get("libraryTooltip")):k.removeAttribute("title")}));if(a.isEditable()){var z=this.editor.graph,B=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(c)}),x=mxUtils.bind(this,function(c){a.constructor!=LocalLibrary&&a.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=m.cloneNode(!1),E.setAttribute("src",Editor.spinImage),E.setAttribute("title",mxResources.get("saving")),E.style.cursor="default",
+E.style.marginRight="2px",E.style.marginTop="-2px",l.insertBefore(E,l.firstChild),g.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),g.style.paddingRight=18*l.childNodes.length+"px")})):null==v&&(v=m.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",mxResources.get("save")),l.insertBefore(v,l.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,
+function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);v.parentNode.removeChild(v);v=null;g.style.paddingRight=18*l.childNodes.length+"px";mxEvent.consume(c)})),g.style.paddingRight=18*l.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,f){a=z.cloneCells(z.model.getTopmostCells(a));for(var g=0;g<a.length;g++){var l=z.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}k.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)}),G=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)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,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)":k.style.border="3px dotted rgb(254, 137, 12)",k.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&&(k.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=
+!0,G(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.shape&&(z.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.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(k,
+"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.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,g,l,m,n,p){if(null!=c&&"image/"==d.substring(0,6)){var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),q=[new mxCell("",new mxGeometry(0,0,m,n),q)];q[0].vertex=!0;C(q,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))}else{p=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var r=JSON.parse(mxUtils.getTextContent(c.documentElement));
+f(r,k);b=b.concat(r);x(a);this.spinner.stop();p=!0}catch(D){}else if("mxfile"==c.documentElement.nodeName)try{r=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),q=this.stringToCells(this.editor.graph.decompress(r)),C(q,new mxRectangle(0,0,m,n),a),p=!0}catch(D){}p||(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(k,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();a.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));l.insertBefore(m,l.firstChild);mxEvent.addListener(m,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);
+m.setAttribute("title",mxResources.get("add"));l.insertBefore(m,l.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)})),l.insertBefore(c,l.firstChild));var E=null;mxEvent.addListener(m,
+"click",G)}g.appendChild(l);g.style.paddingRight=18*l.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"),k=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&
+(f=mxResources.get("cancel"),k=function(){d();e.retry()}),"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 g=window.location.hash;null!=g&&"#G"==
+g.substring(0,2)&&(g=g.substring(2),a+=' <a href="https://drive.google.com/open?id='+g+'" target="_blank">'+mxResources.get("tryOpeningViaThisPage")+"</a>")}else e.code==App.ERROR_TIMEOUT?a=mxResources.get("timeout"):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,k)}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.createImageDataUri=
+function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename,e=d.lastIndexOf(".");0<e&&(d=d.substring(0,e));e="jpeg"==c?"jpg":c;d+="."+e;a=this.createImageDataUri(a,b,c);this.saveData(d,
+e,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(c),
+navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var f=document.createElement("a");if("undefined"!==
+typeof f.download||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));"undefined"!==typeof f.download?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{f.click(),window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.parentNode.removeChild(f)}catch(r){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,
+a+(null!=c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),g=0;g<e;++g){for(var k=1024*g,l=Math.min(k+1024,d),A=Array(l-k),v=0;k<l;++v,++k)A[v]=c[k].charCodeAt(0);f[g]=new Uint8Array(A)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e){e=!mxClient.IS_IOS||!navigator.standalone;
+b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG)f=window.open("about:blank"),null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());else if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('<html><img src="data:'+c+(d?";base64,"+a:";charset=utf8,"+
+encodeURIComponent(a))+'"/></html>'),f.document.close())}else f=window.open("data:"+c+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(u){this.handleError(u)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e,null,null,4);this.showDialog(b.container,
+380,5>this.getServiceCount(!1)-1?270:390,!0,!0);b.init()};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}))};EditorUi.prototype.saveRequest=function(a,b,c){var d=!mxClient.IS_IOS||!navigator.standalone;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var e=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||
+"_blank"==d?"0":"1");null!=e&&(d==App.MODE_DEVICE||"_blank"==d?e.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),a,f,!0,d,c)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();
+this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,d,null,null,4);this.showDialog(a.container,380,5>this.getServiceCount(!1)-1?270:390,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,g,t,u){if(this.spinner.spin(document.body,mxResources.get("export"))){var k=this.editor.graph.isSelectionEmpty();
+c=null!=c?c:k;k=b?null:this.editor.graph.background;k==mxConstants.NONE&&(k=null);null==k&&0==b&&(k="#ffffff");var l=this.editor.graph.getSvg(k,a,g,t,null,c);d&&this.editor.addSvgShadow(l);a=this.getCurrentFile();var m=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=m.lastIndexOf(".");0<a&&(m=m.substring(0,a));var m=m+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,u));var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,l,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,n,this.thumbImageCache)):n(l)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e){var f=document.createElement("input");
+f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");a.appendChild(f);mxUtils.write(a,b);e||mxUtils.br(a);return f};EditorUi.prototype.addLinkSection=function(a,b){function c(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="4px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");
+e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();g.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width="22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,t){var k=this.getCurrentFile(),l=[];d&&(l.push("lightbox=1"),"auto"!=a&&l.push("target="+
+a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),e&&l.push("edit=_blank"),f&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&l.push("page="+a);break}a=!0;null!=g?c="#U"+encodeURIComponent(g):(k=this.getCurrentFile(),t||null==k||k.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,
+null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+k.getHash(),a=!1));a&&null!=k&&null!=k.getTitle()&&k.getTitle()!=this.defaultFilename&&l.push("title="+encodeURIComponent(k.getTitle()));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<l.length?"?"+l.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,t,u,A,v){var k=this.getBasenames(),l={};""!=e&&e!=mxConstants.NONE&&(l.highlight=e);"auto"!==
+d&&(l.target=d);u||(l.lightbox=!1);l.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(l.zoom=c/100);c=[];g&&(c.push("pages"),l.resize=!0,null!=this.pages&&null!=this.currentPage&&(l.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),l.resize=!0);t&&c.push("layers");0<c.length&&(u&&c.push("lightbox"),l.toolbar=c.join(" "));A&&(l.edit=null!=a?a:"_blank");null!=a?l.url=a:l.xml=this.getFileData(!0,null,null,null,null,!g);b='<div class="mxgraph" style="'+(f?"max-width:100%;":
+"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(l))+'"></div>';k=0<k.length?"s="+k.join(";"):"";a=null!=a?"fetch="+encodeURIComponent(a):"";v(b,'<script type="text/javascript" src="'+(0<k.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1&"+k:"https://www.draw.io/embed2.js?"+k)+"&"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=
+function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value",
+"url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(l);mxUtils.br(g);g.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));g.appendChild(l);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(l=document.createElement("a"),
+l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),g.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked","checked");null==c&&k.setAttribute("disabled","disabled");e.appendChild(g);var n=this.addLinkSection(e),z=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var B=document.createElement("input");
+B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";e.appendChild(B);var x=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(e,mxResources.get("allPages"),g,!g),G=this.addCheckbox(e,mxResources.get("layers"),!0),E=this.addCheckbox(e,mxResources.get("lightbox"),!0),y=this.addCheckbox(e,mxResources.get("showEditButton"),!0);y.style.marginLeft="24px";y.style.marginBottom=
+"16px";mxEvent.addListener(E,"change",function(){E.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(k.checked?c:null,z.checked,B.value,n.getTarget(),n.getColor(),x.checked,C.checked,G.checked,E.checked,y.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");
+mxUtils.write(k,a||mxResources.get("link"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var l=this.getCurrentFile(),k="https://desk.draw.io/support/solutions/articles/16000051941-how-to-publicly-publish-a-copy-of-your-draw-io-diagram";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var k="https://desk.draw.io/support/solutions/articles/16000039384-how-to-publicly-publish-a-copy-of-your-draw-io-diagram-stored-in-google-drive",m=document.createElement("div");
+m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);g.appendChild(m);n=document.createElement("a");n.style.paddingLeft=
+"12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,
+300,80,!0,!1);a.init()}))}))}var p=null,q=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",g.appendChild(p),mxUtils.write(g,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom=
+"10px",q.value=d+"px",g.appendChild(q),mxUtils.br(g);var x=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var C=null;if(null==l||l.constructor!=window.DriveFile||b)C=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var G=this.addCheckbox(g,mxResources.get("lightbox"),!0),E=this.addCheckbox(g,mxResources.get("showEditButton"),!0);E.style.marginLeft="24px";var y=this.addCheckbox(g,mxResources.get("layers"),!0);y.style.marginLeft=E.style.marginLeft;y.style.marginBottom="16px";mxEvent.addListener(G,
+"change",function(){G.checked?(y.removeAttribute("disabled"),E.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"))});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(x.getTarget(),x.getColor(),null==C?!0:C.checked,G.checked,E.checked,y.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),k);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+p.select():document.execCommand("selectAll",!1,null)):x.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(f);var g=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),
+!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!g.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var k=this.editor.graph,l=280,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(m);mxUtils.write(g,
+mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";g.appendChild(n);mxUtils.write(g,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value="0";g.appendChild(p);mxUtils.br(g);var q=this.addCheckbox(g,mxResources.get("transparentBackground"),
+k.background==mxConstants.NONE||null==k.background),x=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");f&&(g.appendChild(C),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),l+=26);k.isSelectionEmpty()?C.setAttribute("disabled","disabled"):(C.setAttribute("checked","checked"),C.defaultChecked=!0);var G=this.addCheckbox(g,mxResources.get("shadow"),
+k.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(g.appendChild(E),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),l+=26);var y=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0);a=null!=this.pages&&1<this.pages.length;var H=H=this.addCheckbox(g,mxResources.get("allPages"),a,!a);H.style.marginLeft="24px";
+H.style.marginBottom="16px";mxEvent.addListener(y,"change",function(){y.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled")});c=new CustomDialog(this,g,mxUtils.bind(this,function(){e(n.value,q.checked,!x.checked,G.checked,y.checked,E.checked,p.value,C.checked,!H.checked)}),null,c,d);this.showDialog(c.container,320,l,!0,!0);n.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showExportJpgDialog=
+function(a,b){var c=document.createElement("div");c.style.whiteSpace="nowrap";var d=this.editor.graph,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatJpg"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(e);mxUtils.write(c,mxResources.get("zoom")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.marginRight="16px";f.style.width="60px";f.style.marginLeft="4px";f.style.marginBottom="4px";f.value="100%";
+c.appendChild(f);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),l=document.createElement("input");l.style.marginTop="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");c.appendChild(l);mxUtils.write(c,mxResources.get("crop"));
+mxUtils.br(c);d.isSelectionEmpty()?l.setAttribute("disabled","disabled"):(l.setAttribute("checked","checked"),l.defaultChecked=!0);var A=this.addCheckbox(c,mxResources.get("shadow"),d.shadowVisible),d=document.createElement("input");d.style.marginTop="16px";d.style.marginRight="8px";d.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||d.setAttribute("disabled","disabled");c=new CustomDialog(this,c,mxUtils.bind(this,function(){b(f.value,!k.checked,A.checked,g.value,l.checked)}),
+null,mxResources.get("export"),a);this.showDialog(c.container,320,190,!0,!0);f.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var k=document.createElement("h3");mxUtils.write(k,b);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(k)}var l=
+this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),n=this.addCheckbox(f,c),p=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addCheckbox(f,mxResources.get("showEditButton"),!0);B.style.marginLeft="24px";var x=1<g.model.getChildCount(g.model.getRoot()),C=this.addCheckbox(f,mxResources.get("layers"),x,!x);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="12px";mxEvent.addListener(p,"change",function(){p.checked?(x&&
+C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(l.checked,m.checked,n.checked,p.checked,B.checked,C.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,t){function k(b){var k=" ",m="";d&&(k=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');g('<img src="'+b+'"'+n+(""!=m?' style="'+m+'"':"")+k+"/>")}var l=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");k(a)}),null,null,null,mxUtils.bind(this,function(a){t({message:mxResources.get("unknownError")})}),
null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),l.width*l.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+m+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?k("data:image/png;base64,"+n.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};
EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var k=this.editor.graph.getSvg(),l=k.getElementsByTagName("a");if(null!=l)for(var m=0;m<l.length;m++){var n=l[m].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==l[m].getAttribute("target")&&l[m].removeAttribute("target")}d&&k.setAttribute("content",this.getFileData(!0));b&&this.editor.addSvgShadow(k);if(c){var p=" ",q="";d&&(p="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
diff --git a/war/package.json b/war/package.json
index d06004c8..71184675 100644
--- a/war/package.json
+++ b/war/package.json
@@ -1,32 +1,32 @@
{
- "name": "draw.io",
- "version": "6.2.4",
- "description": "draw.io desktop",
- "main": "electron.js",
- "scripts": {
- "start": "electron ."
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/jgraph/draw.io.git"
- },
- "keywords": [
- "draw.io",
- "diagram",
- "flowchart",
- "UML"
- ],
- "author": "JGraph",
- "license": "GPL-3.0",
- "bugs": {
- "url": "https://github.com/jgraph/draw.io/issues"
- },
- "homepage": "https://github.com/jgraph/draw.io",
- "dependencies": {
- "electron-log": "^1.3.0",
- "electron-updater": "^1.8.2"
- },
- "devDependencies": {
- "electron": "^1.6.2"
- }
-} \ No newline at end of file
+ "name": "draw.io",
+ "version": "1.0.0",
+ "description": "draw.io desktop",
+ "main": "electron.js",
+ "scripts":
+ {
+ "start": "electron ."
+ },
+ "repository":
+ {
+ "type": "git",
+ "url": "git+https://github.com/jgraph/draw.io.git"
+ },
+ "keywords": [
+ "draw.io",
+ "diagram",
+ "flowchart",
+ "UML"
+ ],
+ "author": "JGraph",
+ "license": "GPL-3.0",
+ "bugs":
+ {
+ "url": "https://github.com/jgraph/draw.io/issues"
+ },
+ "homepage": "https://github.com/jgraph/draw.io",
+ "devDependencies":
+ {
+ "electron": "^1.4.13"
+ }
+}
diff --git a/war/resources/dia.txt b/war/resources/dia.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia.txt
+++ b/war/resources/dia.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_am.txt b/war/resources/dia_am.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_am.txt
+++ b/war/resources/dia_am.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_ar.txt b/war/resources/dia_ar.txt
index 1b049b85..2f7c27e1 100644
--- a/war/resources/dia_ar.txt
+++ b/war/resources/dia_ar.txt
@@ -466,6 +466,7 @@ otherViewers=‫مشاهدون آخرون‬
outline=‫حد‬
oval=‫بيضاوي‬
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=‫صفحات‬
pageView=‫مشاهدة الصفحة‬
diff --git a/war/resources/dia_bg.txt b/war/resources/dia_bg.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_bg.txt
+++ b/war/resources/dia_bg.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_bn.txt b/war/resources/dia_bn.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_bn.txt
+++ b/war/resources/dia_bn.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_bs.txt b/war/resources/dia_bs.txt
index 1cd733f3..a57db0c9 100644
--- a/war/resources/dia_bs.txt
+++ b/war/resources/dia_bs.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Ovalan
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Stranice
pageView=Pregled strane
diff --git a/war/resources/dia_ca.txt b/war/resources/dia_ca.txt
index b59225e6..5c4d0e88 100644
--- a/war/resources/dia_ca.txt
+++ b/war/resources/dia_ca.txt
@@ -466,6 +466,7 @@ otherViewers=altres usuaris
outline=Contorn
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pàgines
pageView=Vista de pàgina
diff --git a/war/resources/dia_cs.txt b/war/resources/dia_cs.txt
index 7ddafb73..6c7e2e98 100644
--- a/war/resources/dia_cs.txt
+++ b/war/resources/dia_cs.txt
@@ -466,6 +466,7 @@ otherViewers=další diváci
outline=Obrys
oval=Ovál
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Stránky
pageView=Zobrazení stránky
diff --git a/war/resources/dia_da.txt b/war/resources/dia_da.txt
index c8e6f589..ea2e7694 100644
--- a/war/resources/dia_da.txt
+++ b/war/resources/dia_da.txt
@@ -466,6 +466,7 @@ otherViewers=andre, der kigger med
outline=Oversigt
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Sider
pageView=Sidevisning
diff --git a/war/resources/dia_de.txt b/war/resources/dia_de.txt
index a46bc4e3..232fd1a3 100644
--- a/war/resources/dia_de.txt
+++ b/war/resources/dia_de.txt
@@ -466,6 +466,7 @@ otherViewers=weitere Betrachter
outline=Übersicht
oval=Oval
page=Seite
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Seite-{1}
pages=Seiten
pageView=Seitenansicht
diff --git a/war/resources/dia_el.txt b/war/resources/dia_el.txt
index 56f23036..946f245e 100644
--- a/war/resources/dia_el.txt
+++ b/war/resources/dia_el.txt
@@ -466,6 +466,7 @@ otherViewers=άλλοι θεατές
outline=Περίγραμμα
oval=Οβάλ
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Σελίδες
pageView=Προβολή Σελίδας
diff --git a/war/resources/dia_es.txt b/war/resources/dia_es.txt
index 3aa26d01..aa5fc86d 100644
--- a/war/resources/dia_es.txt
+++ b/war/resources/dia_es.txt
@@ -466,6 +466,7 @@ otherViewers=otros usuarios
outline=Contorno
oval=Óvalo
page=Página
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Página-{1}
pages=Páginas
pageView=Vista de página
diff --git a/war/resources/dia_et.txt b/war/resources/dia_et.txt
index e594b601..5f9d7a76 100644
--- a/war/resources/dia_et.txt
+++ b/war/resources/dia_et.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_fa.txt b/war/resources/dia_fa.txt
index 83926eb4..5f0f0905 100644
--- a/war/resources/dia_fa.txt
+++ b/war/resources/dia_fa.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_fi.txt b/war/resources/dia_fi.txt
index b6375aaa..7bf37f63 100644
--- a/war/resources/dia_fi.txt
+++ b/war/resources/dia_fi.txt
@@ -466,6 +466,7 @@ otherViewers=toiset katselijat
outline=Ääriviiva
oval=Ovaali
page=Sivu
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Sivu-{1}
pages=Sivut
pageView=Sivun katselu
diff --git a/war/resources/dia_fil.txt b/war/resources/dia_fil.txt
index 6d27197f..ae122b50 100644
--- a/war/resources/dia_fil.txt
+++ b/war/resources/dia_fil.txt
@@ -466,6 +466,7 @@ otherViewers=ibang mga tumitingin
outline=Balangkas
oval=Oblong
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Mga pahina
pageView=Pagtingin sa pahina
diff --git a/war/resources/dia_fr.txt b/war/resources/dia_fr.txt
index e4a6ec16..454f0a0b 100644
--- a/war/resources/dia_fr.txt
+++ b/war/resources/dia_fr.txt
@@ -466,6 +466,7 @@ otherViewers=autres lecteurs
outline=Contour
oval=Ovale
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Mise en page
diff --git a/war/resources/dia_gu.txt b/war/resources/dia_gu.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_gu.txt
+++ b/war/resources/dia_gu.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_he.txt b/war/resources/dia_he.txt
index 88358d53..6d0c47fc 100644
--- a/war/resources/dia_he.txt
+++ b/war/resources/dia_he.txt
@@ -466,6 +466,7 @@ otherViewers=‫צופים אחרים‬
outline=‫מתאר‬
oval=‫אליפסי‬
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=‫עמודים‬
pageView=‫תצוגת עמוד‬
diff --git a/war/resources/dia_hi.txt b/war/resources/dia_hi.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_hi.txt
+++ b/war/resources/dia_hi.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_hr.txt b/war/resources/dia_hr.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_hr.txt
+++ b/war/resources/dia_hr.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_hu.txt b/war/resources/dia_hu.txt
index 67e0da08..d20e0fcd 100644
--- a/war/resources/dia_hu.txt
+++ b/war/resources/dia_hu.txt
@@ -466,6 +466,7 @@ otherViewers=másik néző
outline=Áttekintés
oval=Ovális
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Oldalak
pageView=Oldal elrendezés
diff --git a/war/resources/dia_i18n.txt b/war/resources/dia_i18n.txt
index 032a7e5d..bb0f8752 100644
--- a/war/resources/dia_i18n.txt
+++ b/war/resources/dia_i18n.txt
@@ -466,6 +466,7 @@ otherViewers=otherViewers
outline=outline
oval=oval
page=page
+pageContentLinkDescription=pageContentLinkDescription
pageWithNumber=pageWithNumber
pages=pages
pageView=pageView
diff --git a/war/resources/dia_id.txt b/war/resources/dia_id.txt
index e5d8ab63..88409b48 100644
--- a/war/resources/dia_id.txt
+++ b/war/resources/dia_id.txt
@@ -466,6 +466,7 @@ otherViewers=Pengunjung-pengunjung lain
outline=Ikhtisar
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Halaman-Halaman
pageView=Tampilan Halaman
diff --git a/war/resources/dia_it.txt b/war/resources/dia_it.txt
index ef18caf2..0613e88b 100644
--- a/war/resources/dia_it.txt
+++ b/war/resources/dia_it.txt
@@ -466,6 +466,7 @@ otherViewers=altri visitatori
outline=Contorno
oval=Ovale
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pagine
pageView=Vista pagina
diff --git a/war/resources/dia_ja.txt b/war/resources/dia_ja.txt
index 73449048..c5fabcd3 100644
--- a/war/resources/dia_ja.txt
+++ b/war/resources/dia_ja.txt
@@ -466,6 +466,7 @@ otherViewers=他の閲覧者
outline=アウトライン
oval=丸
page=ページ
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=ページ{1}
pages=ページ
pageView=ページのレイアウト
diff --git a/war/resources/dia_kn.txt b/war/resources/dia_kn.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_kn.txt
+++ b/war/resources/dia_kn.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_ko.txt b/war/resources/dia_ko.txt
index 6849e427..f73a54e9 100644
--- a/war/resources/dia_ko.txt
+++ b/war/resources/dia_ko.txt
@@ -466,6 +466,7 @@ otherViewers=다른 뷰어
outline=윤곽
oval=타원형
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=페이지
pageView=페이지 보기
diff --git a/war/resources/dia_lt.txt b/war/resources/dia_lt.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_lt.txt
+++ b/war/resources/dia_lt.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_lv.txt b/war/resources/dia_lv.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_lv.txt
+++ b/war/resources/dia_lv.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_ml.txt b/war/resources/dia_ml.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_ml.txt
+++ b/war/resources/dia_ml.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_mr.txt b/war/resources/dia_mr.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_mr.txt
+++ b/war/resources/dia_mr.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_ms.txt b/war/resources/dia_ms.txt
index 040f8765..b950201c 100644
--- a/war/resources/dia_ms.txt
+++ b/war/resources/dia_ms.txt
@@ -466,6 +466,7 @@ otherViewers=Penonton-penonton lain
outline=Garis
oval=Bujur
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Muka surat
pageView=Pandangan muka surat
diff --git a/war/resources/dia_nl.txt b/war/resources/dia_nl.txt
index 280c3476..7885f185 100644
--- a/war/resources/dia_nl.txt
+++ b/war/resources/dia_nl.txt
@@ -466,6 +466,7 @@ otherViewers=andere bekijkers
outline=Overzicht
oval=Ovaal
page=Pagina
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Pagina-{1}
pages=Pagina's
pageView=Weergave pagina
diff --git a/war/resources/dia_no.txt b/war/resources/dia_no.txt
index ceae79ae..8bf1b2fe 100644
--- a/war/resources/dia_no.txt
+++ b/war/resources/dia_no.txt
@@ -466,6 +466,7 @@ otherViewers=andre lesere
outline=Konturlinje
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Sider
pageView=Sidevisning
diff --git a/war/resources/dia_pl.txt b/war/resources/dia_pl.txt
index 2300ae7c..75125932 100644
--- a/war/resources/dia_pl.txt
+++ b/war/resources/dia_pl.txt
@@ -466,6 +466,7 @@ otherViewers=inni użytkownicy
outline=Obramowanie
oval=Owalny
page=Strona
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Strona-{1}
pages=Strony
pageView=Widok strony
diff --git a/war/resources/dia_pt-br.txt b/war/resources/dia_pt-br.txt
index 2edd97ed..e4161715 100644
--- a/war/resources/dia_pt-br.txt
+++ b/war/resources/dia_pt-br.txt
@@ -466,6 +466,7 @@ otherViewers=outros usuários
outline=Contorno
oval=Oval 
page=Página
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Página-{1}
pages=Páginas
pageView=Layout da Página 
diff --git a/war/resources/dia_pt.txt b/war/resources/dia_pt.txt
index f583e32a..7628d0a2 100644
--- a/war/resources/dia_pt.txt
+++ b/war/resources/dia_pt.txt
@@ -466,6 +466,7 @@ otherViewers=outros usuários
outline=Contorno
oval=Oval 
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Páginas
pageView=Layout da página 
diff --git a/war/resources/dia_ro.txt b/war/resources/dia_ro.txt
index 6cf434ab..da3f0616 100644
--- a/war/resources/dia_ro.txt
+++ b/war/resources/dia_ro.txt
@@ -466,6 +466,7 @@ otherViewers=alţi participanţi
outline=Contur
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pagini
pageView=Stil de pagină
diff --git a/war/resources/dia_ru.txt b/war/resources/dia_ru.txt
index bd06f8c7..b18ab20a 100644
--- a/war/resources/dia_ru.txt
+++ b/war/resources/dia_ru.txt
@@ -466,6 +466,7 @@ otherViewers=другие просматривающие
outline=Контур
oval=Овал
page=Страница
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Страница {1}
pages=Страницы
pageView=Отображать страницы
diff --git a/war/resources/dia_sk.txt b/war/resources/dia_sk.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_sk.txt
+++ b/war/resources/dia_sk.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_sl.txt b/war/resources/dia_sl.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_sl.txt
+++ b/war/resources/dia_sl.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_sr.txt b/war/resources/dia_sr.txt
index b55c2c9b..b4aada1b 100644
--- a/war/resources/dia_sr.txt
+++ b/war/resources/dia_sr.txt
@@ -466,6 +466,7 @@ otherViewers=drugih posmatrača
outline=Pregled
oval=Ovalan
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Stranice
pageView=Pregled strane
diff --git a/war/resources/dia_sv.txt b/war/resources/dia_sv.txt
index 41fc892c..8b5eecda 100644
--- a/war/resources/dia_sv.txt
+++ b/war/resources/dia_sv.txt
@@ -466,6 +466,7 @@ otherViewers=andra läsare
outline=Konturlinje
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Sidor
pageView=Sidvisning
diff --git a/war/resources/dia_sw.txt b/war/resources/dia_sw.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_sw.txt
+++ b/war/resources/dia_sw.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_ta.txt b/war/resources/dia_ta.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_ta.txt
+++ b/war/resources/dia_ta.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_te.txt b/war/resources/dia_te.txt
index 599b7d3c..8f82204b 100644
--- a/war/resources/dia_te.txt
+++ b/war/resources/dia_te.txt
@@ -466,6 +466,7 @@ otherViewers=other viewers
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Pages
pageView=Page View
diff --git a/war/resources/dia_th.txt b/war/resources/dia_th.txt
index fe099c0d..71664b4e 100644
--- a/war/resources/dia_th.txt
+++ b/war/resources/dia_th.txt
@@ -466,6 +466,7 @@ otherViewers=ผู้ดูอื่นๆ
outline=แบบร่าง
oval=รูปไข่
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=หน้า
pageView=มุมมองหน้า
diff --git a/war/resources/dia_tr.txt b/war/resources/dia_tr.txt
index f276abdb..d9a9e3bc 100644
--- a/war/resources/dia_tr.txt
+++ b/war/resources/dia_tr.txt
@@ -466,6 +466,7 @@ otherViewers=diğer izleyici
outline=Kuş bakışı
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Sayfalar
pageView=Sayfa görünümü
diff --git a/war/resources/dia_uk.txt b/war/resources/dia_uk.txt
index b42a0206..a584e2be 100644
--- a/war/resources/dia_uk.txt
+++ b/war/resources/dia_uk.txt
@@ -466,6 +466,7 @@ otherViewers=це також переглядають
outline=Контур
oval=Овал
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Сторінки
pageView=Перегляд сторінки
diff --git a/war/resources/dia_vi.txt b/war/resources/dia_vi.txt
index 91aa3cff..bf996009 100644
--- a/war/resources/dia_vi.txt
+++ b/war/resources/dia_vi.txt
@@ -466,6 +466,7 @@ otherViewers=Người xem khác
outline=Phác thảo
oval=Hình bầu dục
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=Trang
pageView=Xem trang
diff --git a/war/resources/dia_zh-tw.txt b/war/resources/dia_zh-tw.txt
index 32b6b263..8af1f5e9 100644
--- a/war/resources/dia_zh-tw.txt
+++ b/war/resources/dia_zh-tw.txt
@@ -466,6 +466,7 @@ otherViewers=其他檢視之使用者
outline=Outline
oval=Oval
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=第 {1} 頁
pages=頁面
pageView=頁面檢視
diff --git a/war/resources/dia_zh.txt b/war/resources/dia_zh.txt
index ec82a27f..5a25446c 100644
--- a/war/resources/dia_zh.txt
+++ b/war/resources/dia_zh.txt
@@ -466,6 +466,7 @@ otherViewers=其他观众
outline=缩略图
oval=椭圆形
page=Page
+pageContentLinkDescription=To link to an anchor or title on this page, type #anchorname or #titlename. For other pages, type in spacename:pagename#anchorname
pageWithNumber=Page-{1}
pages=页面
pageView=页面视图